{"action":"created","issue":{"url":"https://api.github.com/repos/libgdx/libgdx/issues/4859","repository_url":"https://api.github.com/repos/libgdx/libgdx","labels_url":"https://api.github.com/repos/libgdx/libgdx/issues/4859/labels{/name}","comments_url":"https://api.github.com/repos/libgdx/libgdx/issues/4859/comments","events_url":"https://api.github.com/repos/libgdx/libgdx/issues/4859/events","html_url":"https://github.com/libgdx/libgdx/issues/4859","id":250810361,"number":4859,"title":"The default buffer size on desktop doesn't work well with AudioDevice","user":{"login":"ishitatsuyuki","id":12389383,"avatar_url":"https://avatars2.githubusercontent.com/u/12389383?v=4","gravatar_id":"","url":"https://api.github.com/users/ishitatsuyuki","html_url":"https://github.com/ishitatsuyuki","followers_url":"https://api.github.com/users/ishitatsuyuki/followers","following_url":"https://api.github.com/users/ishitatsuyuki/following{/other_user}","gists_url":"https://api.github.com/users/ishitatsuyuki/gists{/gist_id}","starred_url":"https://api.github.com/users/ishitatsuyuki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ishitatsuyuki/subscriptions","organizations_url":"https://api.github.com/users/ishitatsuyuki/orgs","repos_url":"https://api.github.com/users/ishitatsuyuki/repos","events_url":"https://api.github.com/users/ishitatsuyuki/events{/privacy}","received_events_url":"https://api.github.com/users/ishitatsuyuki/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-08-17T02:11:35Z","updated_at":"2017-08-17T09:49:14Z","closed_at":null,"body":"#### Issue details\r\n\r\nThe default buffer size seems to be too small and causes frequent buffer underflow with AudioDevice.\r\n\r\nOpenAL has a fixed (well, configurable only via user files) [buffer size](https://github.com/kcat/openal-soft/blob/8a735d0ba9db9b4b992172dc197396cc655264d5/alsoftrc.sample#L74) of 1024\\*3 (in frames). The good number I found so far for libGDX is 512\\*18 (this one is in bytes), but I need some math expert here.\r\n\r\nWhy wasn't this reported before? Because nobody uses AudioDevice (it's too poor interface) and the buffer size is [only](https://github.com/libgdx/libgdx/blob/1121605/backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/audio/OpenALMusic.java#L34) [used](https://github.com/libgdx/libgdx/blob/beb8631/backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/audio/OpenALSound.java#L37) [right](https://github.com/libgdx/libgdx/blob/8ed949a/backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/audio/OpenALAudioDevice.java#L51) [here](https://github.com/libgdx/libgdx/blob/c9b3dd2/backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/audio/OpenALAudio.java#L330).\r\n\r\n#### Reproduction steps/code\r\n\r\nLet me be a little lazy here, tell me if you need. I tried to output it on a separate thread, but no luck, the underflow does occur.\r\n\r\n#### Version of LibGDX and/or relevant dependencies\r\nFound on 1.9.6\r\n\r\n#### Please select the affected platforms\r\n- [ ] Android\r\n- [ ] iOS (robovm)\r\n- [ ] iOS (MOE)\r\n- [ ] HTML/GWT\r\n- [x] Windows\r\n- [x] Linux\r\n- [x] MacOS\r\n"},"comment":{"url":"https://api.github.com/repos/libgdx/libgdx/issues/comments/323022509","html_url":"https://github.com/libgdx/libgdx/issues/4859#issuecomment-323022509","issue_url":"https://api.github.com/repos/libgdx/libgdx/issues/4859","id":323022509,"user":{"login":"ishitatsuyuki","id":12389383,"avatar_url":"https://avatars2.githubusercontent.com/u/12389383?v=4","gravatar_id":"","url":"https://api.github.com/users/ishitatsuyuki","html_url":"https://github.com/ishitatsuyuki","followers_url":"https://api.github.com/users/ishitatsuyuki/followers","following_url":"https://api.github.com/users/ishitatsuyuki/following{/other_user}","gists_url":"https://api.github.com/users/ishitatsuyuki/gists{/gist_id}","starred_url":"https://api.github.com/users/ishitatsuyuki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ishitatsuyuki/subscriptions","organizations_url":"https://api.github.com/users/ishitatsuyuki/orgs","repos_url":"https://api.github.com/users/ishitatsuyuki/repos","events_url":"https://api.github.com/users/ishitatsuyuki/events{/privacy}","received_events_url":"https://api.github.com/users/ishitatsuyuki/received_events","type":"User","site_admin":false},"created_at":"2017-08-17T09:49:14Z","updated_at":"2017-08-17T09:49:14Z","body":"Yes. Out-of-box compatibility is important.\r\n\r\nI also considered to override the OpenAL soft configuration, but two pitfalls here: Creative sound cards exist (which we can't override the settings as it's a different impl), and the method of overriding is much a hack: setting an environment variable *before* the library initializes. It's too hacky to suggest."}}
{"actor":{"display_login":"ishitatsuyuki"}}