Commit 878c2324b129ea371880883cd83604af91797205

Ryan C. Gordon 2015-03-24T02:13:25

winmm: Let audio callback buffer size be less than 1/4 second (thanks, Jon!). Maybe this was here for Win9x? There's no reason to insert this much latency by default. Fixes Bugzilla #2835.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/audio/winmm/SDL_winmm.c b/src/audio/winmm/SDL_winmm.c
index 5600ec3..a61ac23 100644
--- a/src/audio/winmm/SDL_winmm.c
+++ b/src/audio/winmm/SDL_winmm.c
@@ -248,10 +248,6 @@ WINMM_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
     if (this->spec.channels > 2)
         this->spec.channels = 2;        /* !!! FIXME: is this right? */
 
-    /* Check the buffer size -- minimum of 1/4 second (word aligned) */
-    if (this->spec.samples < (this->spec.freq / 4))
-        this->spec.samples = ((this->spec.freq / 4) + 3) & ~3;
-
     while ((!valid_datatype) && (test_format)) {
         switch (test_format) {
         case AUDIO_U8: