Fix wrong buffer size computation for SDL audio. This led to borked sound in some

applications, and wrong timings in others.
http://bugzilla.libsdl.org/show_bug.cgi?id=1679
This commit is contained in:
Adrien Destugues
2013-01-01 21:57:15 +00:00
parent 21c2a4943e
commit 14f1800c0a
2 changed files with 19 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
--- libsdl-1.2-hg/src/audio/baudio/SDL_beaudio.cc dim. nov. 04 19:07:49 2012 +0100
+++ b/src/audio/baudio/SDL_beaudio.cc mar. janv. 01 22:41:22 2013 +0100
@@ -199,11 +199,11 @@
return (-1);
}
- format.buffer_size = spec->samples;
-
/* Calculate the final parameters for this audio specification */
SDL_CalculateAudioSpec(spec);
+ format.buffer_size = spec->size;
+
/* Subscribe to the audio stream (creates a new thread) */
{ sigset_t omask;
SDL_MaskSignals(&omask);
return (-1);
}