diff options
Diffstat (limited to 'audio')
-rw-r--r-- | audio/decoders/voc.cpp | 14 | ||||
-rw-r--r-- | audio/mods/maxtrax.h | 7 | ||||
-rw-r--r-- | audio/mods/protracker.cpp | 4 | ||||
-rw-r--r-- | audio/mods/protracker.h | 1 | ||||
-rw-r--r-- | audio/mods/tfmx.h | 7 |
5 files changed, 19 insertions, 14 deletions
diff --git a/audio/decoders/voc.cpp b/audio/decoders/voc.cpp index f0b5b2777d..fa330c6f2c 100644 --- a/audio/decoders/voc.cpp +++ b/audio/decoders/voc.cpp @@ -321,9 +321,14 @@ void VocStream::preProcess() { // In case we hit a "Terminator" block we also break here. if (_stream->eos() || block.code == 0) break; - // We also allow 128 as terminator, since Simon 1 Amiga CD32 uses it. - if (block.code == 128) { - debug(3, "VocStream::preProcess: Caught 128 as terminator"); + // We will allow invalid block numbers as terminators. This is needed, + // since some games ship broken VOC files. The following occasions are + // known: + // - 128 is used as terminator in Simon 1 Amiga CD32 + // - Full Throttle contains a VOC file with an incorrect block length + // resulting in a sample (127) to be read as block code. + if (block.code > 9) { + warning("VocStream::preProcess: Caught %d as terminator", block.code); break; } @@ -482,7 +487,8 @@ void VocStream::preProcess() { default: warning("Unhandled code %d in VOC file (len %d)", block.code, block.length); - return; + // Skip the whole block and try to use the next one. + skip = block.length; } // Premature end of stream => error! diff --git a/audio/mods/maxtrax.h b/audio/mods/maxtrax.h index c45a21a255..ffb176c241 100644 --- a/audio/mods/maxtrax.h +++ b/audio/mods/maxtrax.h @@ -20,11 +20,8 @@ * */ -// see if all engines using this class are DISABLED -#if !defined(ENABLE_KYRA) - -// normal Header Guard -#elif !defined(AUDIO_MODS_MAXTRAX_H) +// Only compiled if Kyra is built-in or we're building for dynamic modules +#if !defined(AUDIO_MODS_MAXTRAX_H) && (defined(ENABLE_KYRA) || defined(DYNAMIC_MODULES)) #define AUDIO_MODS_MAXTRAX_H // #define MAXTRAX_HAS_MODULATION diff --git a/audio/mods/protracker.cpp b/audio/mods/protracker.cpp index 084b0edf9a..1e18d5adf8 100644 --- a/audio/mods/protracker.cpp +++ b/audio/mods/protracker.cpp @@ -61,6 +61,7 @@ private: struct { byte sample; + byte lastSample; uint16 period; Offset offset; @@ -184,6 +185,7 @@ void ProtrackerStream::updateRow() { _track[track].vibratoPos = 0; } _track[track].sample = note.sample; + _track[track].lastSample = note.sample; _track[track].finetune = _module.sample[note.sample - 1].finetune; _track[track].vol = _module.sample[note.sample - 1].vol; } @@ -194,7 +196,9 @@ void ProtrackerStream::updateRow() { _track[track].period = _module.noteToPeriod(note.note, _track[track].finetune); else _track[track].period = note.period; + _track[track].offset = Offset(0); + _track[track].sample = _track[track].lastSample; } } diff --git a/audio/mods/protracker.h b/audio/mods/protracker.h index d52322f07e..5f47c4453b 100644 --- a/audio/mods/protracker.h +++ b/audio/mods/protracker.h @@ -25,6 +25,7 @@ * Sound decoder used in engines: * - agos * - parallaction + * - gob */ #ifndef AUDIO_MODS_PROTRACKER_H diff --git a/audio/mods/tfmx.h b/audio/mods/tfmx.h index 4174fbfb27..ebe1172278 100644 --- a/audio/mods/tfmx.h +++ b/audio/mods/tfmx.h @@ -20,11 +20,8 @@ * */ -// see if all engines using this class are DISABLED -#if !defined(ENABLE_SCUMM) - -// normal Header Guard -#elif !defined(AUDIO_MODS_TFMX_H) +// Only compiled if SCUMM is built-in or we're building for dynamic modules +#if !defined(AUDIO_MODS_TFMX_H) && (defined(ENABLE_SCUMM) || defined(DYNAMIC_MODULES)) #define AUDIO_MODS_TFMX_H #include "audio/mods/paula.h" |