diff options
author | Matthew Stewart | 2018-05-07 17:12:07 -0400 |
---|---|---|
committer | Eugene Sandulenko | 2018-08-09 08:37:30 +0200 |
commit | 69dac4d62d8179d0692476efe980934e51bda9ac (patch) | |
tree | 0346cc9181efc5b7af790d657f797ab199bfc574 /engines/startrek/sound.cpp | |
parent | f43c5d468784b72c92e557c83b22c9c34f8ce497 (diff) | |
download | scummvm-rg350-69dac4d62d8179d0692476efe980934e51bda9ac.tar.gz scummvm-rg350-69dac4d62d8179d0692476efe980934e51bda9ac.tar.bz2 scummvm-rg350-69dac4d62d8179d0692476efe980934e51bda9ac.zip |
STARTREK: Add debug channel for sound
Diffstat (limited to 'engines/startrek/sound.cpp')
-rwxr-xr-x | engines/startrek/sound.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/startrek/sound.cpp b/engines/startrek/sound.cpp index 32b31901b8..7b16c289ac 100755 --- a/engines/startrek/sound.cpp +++ b/engines/startrek/sound.cpp @@ -88,6 +88,8 @@ void Sound::playMidiTrack(int track) { assert(loadedSoundData != NULL); + debugC(6, kDebugSound, "Playing MIDI track %d", track); + // Check if a midi slot for this track exists already for (int i=1; i<8; i++) { if (_midiSlots[i].track == track) { @@ -152,10 +154,13 @@ void Sound::playSoundEffect(const char *baseSoundName) { if (readStream == nullptr) error("Couldn't open '%s'", soundName.c_str()); + debugC(5, kDebugSound, "Playing sound effect '%s'", baseSoundName); Audio::AudioStream *audioStream = Audio::makeVOCStream(readStream, Audio::FLAG_UNSIGNED, DisposeAfterUse::YES); _vm->_system->getMixer()->playStream(Audio::Mixer::kSFXSoundType, &_sfxHandles[i], audioStream); return; } + + debugC(3, kDebugSound, "No sound slot to play '%s'", baseSoundName); } void Sound::playSpeech(const Common::String &basename) { @@ -174,7 +179,7 @@ void Sound::playSpeech(const Common::String &basename) { } Common::String filename = "voc/" + Common::String(name.c_str(), name.c_str()+i) + ".voc"; - debug("Playing speech '%s'", filename.c_str()); + debugC(5, kDebugSound, "Playing speech '%s'", filename.c_str()); Common::SeekableReadStream *readStream = SearchMan.createReadStreamForMember(filename); if (readStream == nullptr) error("Couldn't open '%s'", filename.c_str()); @@ -197,6 +202,7 @@ void Sound::playSpeech(const Common::String &basename) { void Sound::stopPlayingSpeech() { if (_playingSpeech) { + debugC(5, kDebugSound, "Canceled speech playback"); _playingSpeech = false; _vm->_system->getMixer()->stopHandle(_speechHandle); } @@ -230,7 +236,7 @@ void Sound::loadPCMusicFile(const char *baseSoundName) { break; } - debug(0, "Playing sound \'%s\'\n", soundName.c_str()); + debugC(5, kDebugSound, "Loading midi \'%s\'\n", soundName.c_str()); SharedPtr<Common::SeekableReadStream> soundStream = _vm->openFile(soundName.c_str()); if (loadedSoundData != nullptr) |