{"id":20769113,"url":"https://github.com/sonoro1234/luajit-sdl2","last_synced_at":"2025-07-08T00:38:32.559Z","repository":{"id":72426281,"uuid":"158223909","full_name":"sonoro1234/LuaJIT-SDL2","owner":"sonoro1234","description":"autogenerated LuaJIT bindings for SDL2 with threads and audio","archived":false,"fork":false,"pushed_at":"2024-10-15T15:21:21.000Z","size":864,"stargazers_count":31,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-30T12:21:19.326Z","etag":null,"topics":["audio","luajit","sdl2","threads"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sonoro1234.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-19T13:03:18.000Z","updated_at":"2025-03-24T18:00:58.000Z","dependencies_parsed_at":"2024-10-18T21:21:58.011Z","dependency_job_id":null,"html_url":"https://github.com/sonoro1234/LuaJIT-SDL2","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sonoro1234/LuaJIT-SDL2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonoro1234%2FLuaJIT-SDL2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonoro1234%2FLuaJIT-SDL2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonoro1234%2FLuaJIT-SDL2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonoro1234%2FLuaJIT-SDL2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sonoro1234","download_url":"https://codeload.github.com/sonoro1234/LuaJIT-SDL2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonoro1234%2FLuaJIT-SDL2/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264169448,"owners_count":23567304,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","luajit","sdl2","threads"],"created_at":"2024-11-17T11:42:30.400Z","updated_at":"2025-07-08T00:38:32.514Z","avatar_url":"https://github.com/sonoro1234.png","language":"Lua","readme":"# LuaJIT-SDL2\nautogenerated LuaJIT bindings for SDL2 2.30.3\n\nif interested in SDL3 there is also https://github.com/sonoro1234/LuaJIT-SDL3\n\nSet CMake LUAJIT_BIN to the LuaJIT directory for installing.\n\nSee test folder examples for usage\n\nluajit-async (taken from https://github.com/sonoro1234/luajit-async) needs to be installed for providing lua functions that can be called from another thread (sdl.MakeAudioCallback and sdl.MakeThreadFunc).\n\nThis repo is used in https://github.com/sonoro1234/LuaJIT-ImGui where you get very usefull GUI widgets.\n\nAll above can be found at https://github.com/sonoro1234/anima\n\n# sdlAudioPlayer\n\nsimple interface for playing sndfile files from disk\n\n```lua\nlocal sndf = require\"LuaJIT-libsndfile\"\nlocal AudioPlayer = require\"sdlAudioPlayer\"\n\n--copy specs from file\nlocal info = sndf.get_info(filename)\nlocal audioplayer,err = AudioPlayer({\n    --device = device_name, --nil as device\n    freq = info.samplerate, \n    format = sdl.AUDIO_S16SYS,\n    channels = info.channels, \n    samples = 1024})\n\n--insert several files\nfor i=1,10 do\n\t--filename, level, timeoffset\n\taudioplayer:insert(filename,(11-i)*0.1,i*0.6)\nend\n--show them\nfor node in audioplayer:nodes() do\n    print(\"node\",node.sf)\nend\n\n--play them 7 secs\naudioplayer:start()\nsdl.Delay(7000);\n--close\naudioplayer:close()\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonoro1234%2Fluajit-sdl2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonoro1234%2Fluajit-sdl2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonoro1234%2Fluajit-sdl2/lists"}