Use correct value when calculating audio conversion length. SDL-1.2
authorRyan C. Gordon <icculus@icculus.org>
Mon, 21 Sep 2009 06:18:52 +0000
branchSDL-1.2
changeset 420512da7861173e
parent 4204 976bc19f8f6b
child 4206 892623cfee40
Use correct value when calculating audio conversion length.

Fixes Bugzilla #477.
src/audio/SDL_audio.c
     1.1 --- a/src/audio/SDL_audio.c	Mon Sep 21 06:08:23 2009 +0000
     1.2 +++ b/src/audio/SDL_audio.c	Mon Sep 21 06:18:52 2009 +0000
     1.3 @@ -532,7 +532,7 @@
     1.4  			return(-1);
     1.5  		}
     1.6  		if ( audio->convert.needed ) {
     1.7 -			audio->convert.len = (int) ( ((double) desired->size) /
     1.8 +			audio->convert.len = (int) ( ((double) audio->spec.size) /
     1.9                                            audio->convert.len_ratio );
    1.10  			audio->convert.buf =(Uint8 *)SDL_AllocAudioMem(
    1.11  			   audio->convert.len*audio->convert.len_mult);