mirror of https://github.com/bsnes-emu/bsnes.git
Use a smaller audio buffer size if supported.
This commit is contained in:
parent
ece1a11a23
commit
6e7ab3558a
|
@ -477,7 +477,13 @@ usage:
|
||||||
want_aspec.freq = AUDIO_FREQUENCY;
|
want_aspec.freq = AUDIO_FREQUENCY;
|
||||||
want_aspec.format = AUDIO_S16SYS;
|
want_aspec.format = AUDIO_S16SYS;
|
||||||
want_aspec.channels = 2;
|
want_aspec.channels = 2;
|
||||||
|
#if SDL_COMPILEDVERSION == 2005 && defined(__APPLE__)
|
||||||
|
/* SDL 2.0.5 on macOS introduced a bug where certain combinations of buffer lengths and frequencies
|
||||||
|
fail to produce audio correctly. This bug was fixed 2.0.6. */
|
||||||
want_aspec.samples = 2048;
|
want_aspec.samples = 2048;
|
||||||
|
#else
|
||||||
|
want_aspec.samples = 512;
|
||||||
|
#endif
|
||||||
want_aspec.callback = audio_callback;
|
want_aspec.callback = audio_callback;
|
||||||
want_aspec.userdata = &gb;
|
want_aspec.userdata = &gb;
|
||||||
SDL_OpenAudio(&want_aspec, &have_aspec);
|
SDL_OpenAudio(&want_aspec, &have_aspec);
|
||||||
|
|
Loading…
Reference in New Issue