Skip to content

Commit

Permalink
Use correct value when calculating audio conversion length.
Browse files Browse the repository at this point in the history
  Fixes Bugzilla #477.
  • Loading branch information
icculus committed Sep 21, 2009
1 parent 1751e87 commit 821219e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/audio/SDL_audio.c
Expand Up @@ -532,7 +532,7 @@ int SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpec *obtained)
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);
Expand Down

0 comments on commit 821219e

Please sign in to comment.