comparison src/audio/SDL_audio.c @ 4205:12da7861173e SDL-1.2

Use correct value when calculating audio conversion length. Fixes Bugzilla #477.
author Ryan C. Gordon <icculus@icculus.org>
date Mon, 21 Sep 2009 06:18:52 +0000
parents a1b03ba2fcd0
children 5007e6a66814
comparison
equal deleted inserted replaced
4204:976bc19f8f6b 4205:12da7861173e
530 audio->spec.freq) < 0 ) { 530 audio->spec.freq) < 0 ) {
531 SDL_CloseAudio(); 531 SDL_CloseAudio();
532 return(-1); 532 return(-1);
533 } 533 }
534 if ( audio->convert.needed ) { 534 if ( audio->convert.needed ) {
535 audio->convert.len = (int) ( ((double) desired->size) / 535 audio->convert.len = (int) ( ((double) audio->spec.size) /
536 audio->convert.len_ratio ); 536 audio->convert.len_ratio );
537 audio->convert.buf =(Uint8 *)SDL_AllocAudioMem( 537 audio->convert.buf =(Uint8 *)SDL_AllocAudioMem(
538 audio->convert.len*audio->convert.len_mult); 538 audio->convert.len*audio->convert.len_mult);
539 if ( audio->convert.buf == NULL ) { 539 if ( audio->convert.buf == NULL ) {
540 SDL_CloseAudio(); 540 SDL_CloseAudio();