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 4205 12da7861173e
parent 4204 976bc19f8f6b
child 4206 892623cfee40
Use correct value when calculating audio conversion length. Fixes Bugzilla #477.
src/audio/SDL_audio.c
--- a/src/audio/SDL_audio.c	Mon Sep 21 06:08:23 2009 +0000
+++ b/src/audio/SDL_audio.c	Mon Sep 21 06:18:52 2009 +0000
@@ -532,7 +532,7 @@
 			return(-1);
 		}
 		if ( audio->convert.needed ) {
-			audio->convert.len = (int) ( ((double) desired->size) /
+			audio->convert.len = (int) ( ((double) audio->spec.size) /
                                           audio->convert.len_ratio );
 			audio->convert.buf =(Uint8 *)SDL_AllocAudioMem(
 			   audio->convert.len*audio->convert.len_mult);