diff options
Diffstat (limited to 'engines/hopkins')
-rw-r--r-- | engines/hopkins/sound.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/engines/hopkins/sound.cpp b/engines/hopkins/sound.cpp index 9f0212c9aa..d9a6ed7730 100644 --- a/engines/hopkins/sound.cpp +++ b/engines/hopkins/sound.cpp @@ -30,6 +30,7 @@ #include "hopkins/hopkins.h" #include "audio/audiostream.h" #include "audio/mods/protracker.h" +#include "audio/decoders/raw.h" namespace Audio { @@ -157,6 +158,11 @@ protected: return true; } + if (file->open(filename + ".RAW")) { + _cueStream = Audio::makeRawStream(file, 22050, Audio::FLAG_UNSIGNED, DisposeAfterUse::YES); + return true; + } + warning("TwaAudioStream::loadCue: Missing cue %d (%s)", nr, filename.c_str()); _loadedCue = -1; delete file; @@ -552,6 +558,19 @@ bool SoundManager::mixVoice(int voiceId, int voiceMode) { catPos = _vm->_globals._catalogPos; catLen = _vm->_globals._catalogSize; + } else if (!_vm->_fileManager.searchCat(filename + ".RAW", 9)) { + if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS) + filename = "ENG_VOI.RES"; + // Win95 and Linux versions uses another set of names + else if (_vm->_globals._language == LANG_FR) + filename = "RES_VFR.RES"; + else if (_vm->_globals._language == LANG_EN) + filename = "RES_VAN.RES"; + else if (_vm->_globals._language == LANG_SP) + filename = "RES_VES.RES"; + + catPos = _vm->_globals._catalogPos; + catLen = _vm->_globals._catalogSize; } else { if (!f.exists(filename + ".WAV")) { if (!f.exists(filename + ".APC")) @@ -845,8 +864,10 @@ void SoundManager::updateScummVMSoundSettings() { Audio::RewindableAudioStream *SoundManager::makeSoundStream(Common::SeekableReadStream *stream) { if (_vm->getPlatform() == Common::kPlatformWindows) return Audio::makeAPCStream(stream, DisposeAfterUse::YES); - else + else if (_vm->getPlatform() == Common::kPlatformLinux) return Audio::makeWAVStream(stream, DisposeAfterUse::YES); + else + return Audio::makeRawStream(stream, 22050, Audio::FLAG_UNSIGNED, DisposeAfterUse::YES); } // Blatant rip from gob engine. Hi DrMcCoy! |