diff options
author | Strangerke | 2013-01-18 21:09:41 +0100 |
---|---|---|
committer | Strangerke | 2013-01-18 21:09:41 +0100 |
commit | 0d92a7e5a3a9dd8303e01f17c9206e645c10b4de (patch) | |
tree | 1fd12ad03ed872d6c177abb03cb7946bdfcb5527 /engines | |
parent | 4fd4a5ce0565c158af81d8aea6c67bea35501181 (diff) | |
download | scummvm-rg350-0d92a7e5a3a9dd8303e01f17c9206e645c10b4de.tar.gz scummvm-rg350-0d92a7e5a3a9dd8303e01f17c9206e645c10b4de.tar.bz2 scummvm-rg350-0d92a7e5a3a9dd8303e01f17c9206e645c10b4de.zip |
HOPKINS: Add support for RAW speechs used by the OS/2 version
Diffstat (limited to 'engines')
-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! |