From 1b61053c53feea4bf04bb8d0ee1b8b236fde847d Mon Sep 17 00:00:00 2001 From: Daniel Gibson Date: Wed, 7 Apr 2021 17:04:32 +0200 Subject: [PATCH] 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) --- neo/sound/snd_cache.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/neo/sound/snd_cache.cpp b/neo/sound/snd_cache.cpp index 1e44bfc5..55166822 100644 --- a/neo/sound/snd_cache.cpp +++ b/neo/sound/snd_cache.cpp @@ -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() ) ) ) {