audio: Calculate a legitimate SDL_AudioSpec::silence in SDL_LoadWAV_RW().

This commit is contained in:
Ryan C. Gordon
2020-01-21 15:49:37 -05:00
parent 55afc281fa
commit dbe5c14b33
3 changed files with 22 additions and 15 deletions

View File

@@ -2081,6 +2081,8 @@ WaveLoad(SDL_RWops *src, WaveFile *file, SDL_AudioSpec *spec, Uint8 **audio_buf,
break;
}
spec->silence = SDL_SilenceValueForFormat(spec->format);
/* Report the end position back to the cleanup code. */
if (RIFFlengthknown) {
chunk->position = RIFFend;