1.3 branch version of revision 2878.
authorRyan C. Gordon <icculus@icculus.org>
Fri, 27 Oct 2006 20:19:48 +0000
changeset 2053716cf90f24a0
parent 2052 eb5e61b72da3
child 2054 d22372343744
1.3 branch version of revision 2878.

Fixes Bugzilla #298.
src/audio/SDL_audio.c
     1.1 --- a/src/audio/SDL_audio.c	Sat Oct 21 18:56:35 2006 +0000
     1.2 +++ b/src/audio/SDL_audio.c	Fri Oct 27 20:19:48 2006 +0000
     1.3 @@ -688,7 +688,9 @@
     1.4              return 0;
     1.5          }
     1.6          if (device->convert.needed) {
     1.7 -            device->convert.len = desired.size;
     1.8 +            device->convert.len = (int) ( ((double) desired.size) /
     1.9 +                                          device->convert.len_ratio );
    1.10 +
    1.11              device->convert.buf =
    1.12                  (Uint8 *) SDL_AllocAudioMem(device->convert.len *
    1.13                                              device->convert.len_mult);