src/audio/SDL_audio.c
changeset 2053 716cf90f24a0
parent 2049 5f6550e5184f
child 2060 866052b01ee5
--- a/src/audio/SDL_audio.c	Sat Oct 21 18:56:35 2006 +0000
+++ b/src/audio/SDL_audio.c	Fri Oct 27 20:19:48 2006 +0000
@@ -688,7 +688,9 @@
             return 0;
         }
         if (device->convert.needed) {
-            device->convert.len = desired.size;
+            device->convert.len = (int) ( ((double) desired.size) /
+                                          device->convert.len_ratio );
+
             device->convert.buf =
                 (Uint8 *) SDL_AllocAudioMem(device->convert.len *
                                             device->convert.len_mult);