From 2817bc550872c121daf2eea7d4b1a3fef160e48f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 1 Feb 2020 17:34:06 +0100 Subject: [PATCH] - backported fix for loading VOC files. In NAM there is one that needed a bit of extra treatment. --- src/sound/backend/i_sound.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sound/backend/i_sound.cpp b/src/sound/backend/i_sound.cpp index bedc232927..3a9a3a12f8 100644 --- a/src/sound/backend/i_sound.cpp +++ b/src/sound/backend/i_sound.cpp @@ -370,7 +370,7 @@ SoundHandle SoundRenderer::LoadSoundVoc(uint8_t *sfxdata, int length) switch (blocktype) { case 1: // Sound data - if (noextra && (codec == -1 || codec == sfxdata[i+1])) + if (/*noextra &*/ (codec == -1 || codec == sfxdata[i + 1])) // NAM contains a VOC where a valid data block follows an extra block. { frequency = 1000000/(256 - sfxdata[i]); channels = 1; @@ -382,6 +382,7 @@ SoundHandle SoundRenderer::LoadSoundVoc(uint8_t *sfxdata, int length) else okay = false; len += blocksize - 2; } + else okay = false; break; case 2: // Sound data continuation if (codec == -1)