mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-14 00:20:51 +00:00
- backported fix for loading VOC files.
In NAM there is one that needed a bit of extra treatment.
This commit is contained in:
parent
5b4c9eb7f6
commit
2817bc5508
1 changed files with 2 additions and 1 deletions
|
@ -370,7 +370,7 @@ SoundHandle SoundRenderer::LoadSoundVoc(uint8_t *sfxdata, int length)
|
||||||
switch (blocktype)
|
switch (blocktype)
|
||||||
{
|
{
|
||||||
case 1: // Sound data
|
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]);
|
frequency = 1000000/(256 - sfxdata[i]);
|
||||||
channels = 1;
|
channels = 1;
|
||||||
|
@ -382,6 +382,7 @@ SoundHandle SoundRenderer::LoadSoundVoc(uint8_t *sfxdata, int length)
|
||||||
else okay = false;
|
else okay = false;
|
||||||
len += blocksize - 2;
|
len += blocksize - 2;
|
||||||
}
|
}
|
||||||
|
else okay = false;
|
||||||
break;
|
break;
|
||||||
case 2: // Sound data continuation
|
case 2: // Sound data continuation
|
||||||
if (codec == -1)
|
if (codec == -1)
|
||||||
|
|
Loading…
Reference in a new issue