idSoundSample::Load() uses s_decompressionLimit for oggs again

The code to decompress OGG files directly on load if they're shorter
than s_decompressionLimit seconds (usually 6) accidentally got broken
when removing the non-OpenAL soundbackends:
`if ( objectInfo.wFormatTag == WAVE_FORMAT_TAG_OGG )` slipped into the
`if ( objectInfo.wFormatTag == WAVE_FORMAT_TAG_PCM )` block - obviously
both can't be true at the same time so the OGG case was never executed.
Now it's in its own block again. I put it into a {} scope so it doesn't
have to be re-indented (=> more useful with git blame)
This commit is contained in:
Daniel Gibson 2021-04-07 17:04:32 +02:00
parent f024a8440c
commit 1b61053c53

View file

@ -501,7 +501,9 @@ void idSoundSample::Load( void ) {
hardwareBuffer = true;
}
}
}
{
// OGG decompressed at load time (when smaller than s_decompressionLimit seconds, 6 seconds by default)
if ( objectInfo.wFormatTag == WAVE_FORMAT_TAG_OGG ) {
if ( ( objectSize < ( ( int ) objectInfo.nSamplesPerSec * idSoundSystemLocal::s_decompressionLimit.GetInteger() ) ) ) {