# HG changeset patch # User Ryan C. Gordon # Date 1161980388 0 # Node ID 716cf90f24a0810b5df4dcafaf601a467edfb6c8 # Parent eb5e61b72da3655835b33bd3bb9f0abcc8511b52 1.3 branch version of revision 2878. Fixes Bugzilla #298. diff -r eb5e61b72da3 -r 716cf90f24a0 src/audio/SDL_audio.c --- 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);