mirror of
https://github.com/yawut/SDL.git
synced 2026-04-25 15:58:04 -05:00
Use secondary audio buffers to avoid problems on various soundcards
This commit is contained in:
parent
eb7b6faa10
commit
d0d4c9eaae
|
|
@ -662,10 +662,12 @@ static int DX5_OpenAudio(_THIS, SDL_AudioSpec *spec)
|
||||||
|
|
||||||
/* Create the audio buffer to which we write */
|
/* Create the audio buffer to which we write */
|
||||||
NUM_BUFFERS = -1;
|
NUM_BUFFERS = -1;
|
||||||
|
#ifdef USE_PRIMARY_BUFFER
|
||||||
if ( mainwin ) {
|
if ( mainwin ) {
|
||||||
NUM_BUFFERS = CreatePrimary(sound, mainwin, &mixbuf,
|
NUM_BUFFERS = CreatePrimary(sound, mainwin, &mixbuf,
|
||||||
&waveformat, spec->size);
|
&waveformat, spec->size);
|
||||||
}
|
}
|
||||||
|
#endif /* USE_PRIMARY_BUFFER */
|
||||||
if ( NUM_BUFFERS < 0 ) {
|
if ( NUM_BUFFERS < 0 ) {
|
||||||
NUM_BUFFERS = CreateSecondary(sound, mainwin, &mixbuf,
|
NUM_BUFFERS = CreateSecondary(sound, mainwin, &mixbuf,
|
||||||
&waveformat, spec->size);
|
&waveformat, spec->size);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user