diff options
author | Sven Hesse | 2008-05-17 19:01:00 +0000 |
---|---|---|
committer | Sven Hesse | 2008-05-17 19:01:00 +0000 |
commit | 6e13bde2130fb12f7d307c4fcdedd8e36e3038bb (patch) | |
tree | e47f3ec74503f4b0c8f7a3a0b06c9b7fbdf013d7 /engines/gob/sound/sound.cpp | |
parent | 2e14d05caa043848f7d74f53117bce284c325b12 (diff) | |
download | scummvm-rg350-6e13bde2130fb12f7d307c4fcdedd8e36e3038bb.tar.gz scummvm-rg350-6e13bde2130fb12f7d307c4fcdedd8e36e3038bb.tar.bz2 scummvm-rg350-6e13bde2130fb12f7d307c4fcdedd8e36e3038bb.zip |
Changing debug channels a bit
svn-id: r32157
Diffstat (limited to 'engines/gob/sound/sound.cpp')
-rw-r--r-- | engines/gob/sound/sound.cpp | 58 |
1 files changed, 57 insertions, 1 deletions
diff --git a/engines/gob/sound/sound.cpp b/engines/gob/sound/sound.cpp index 63b74ca36f..79fe5acb56 100644 --- a/engines/gob/sound/sound.cpp +++ b/engines/gob/sound/sound.cpp @@ -92,6 +92,8 @@ bool Sound::sampleLoad(SoundDesc *sndDesc, const char *fileName, bool tryExist) if (!sndDesc) return false; + debugC(2, kDebugSound, "Loading sample \"%s\"", fileName); + int16 handle = _vm->_dataIO->openData(fileName); if (handle < 0) { warning("Can't open sample file \"%s\"", fileName); @@ -137,6 +139,8 @@ void Sound::speakerOn(int16 frequency, int32 length) { if (!_pcspeaker) return; + debugC(1, kDebugSound, "PCSpeaker: Playing tone (%d, %d)", frequency, length); + _pcspeaker->speakerOn(frequency, length); } @@ -144,6 +148,8 @@ void Sound::speakerOff() { if (!_pcspeaker) return; + debugC(1, kDebugSound, "PCSpeaker: Stopping tone"); + _pcspeaker->speakerOff(); } @@ -158,6 +164,8 @@ bool Sound::infogramesLoadInstruments(const char *fileName) { if (!_infogrames) return false; + debugC(1, kDebugSound, "Infogrames: Loading instruments \"%s\"", fileName); + return _infogrames->loadInstruments(fileName); } @@ -165,6 +173,8 @@ bool Sound::infogramesLoadSong(const char *fileName) { if (!_infogrames) return false; + debugC(1, kDebugSound, "Infogrames: Loading song \"%s\"", fileName); + return _infogrames->loadSong(fileName); } @@ -172,6 +182,8 @@ void Sound::infogramesPlay() { if (!_infogrames) return; + debugC(1, kDebugSound, "Infogrames: Starting playback"); + _infogrames->play(); } @@ -179,6 +191,8 @@ void Sound::infogramesStop() { if (!_infogrames) return; + debugC(1, kDebugSound, "Infogrames: Stopping playback"); + _infogrames->stop(); } @@ -186,6 +200,8 @@ bool Sound::adlibLoad(const char *fileName) { if (!_adlib) return false; + debugC(1, kDebugSound, "Adlib: Loading data (\"%s\")", fileName); + return _adlib->load(fileName); } @@ -193,6 +209,8 @@ bool Sound::adlibLoad(byte *data, uint32 size, int index) { if (!_adlib) return false; + debugC(1, kDebugSound, "Adlib: Loading data (%d)", index); + return _adlib->load(data, size, index); } @@ -200,6 +218,8 @@ void Sound::adlibUnload() { if (!_adlib) return; + debugC(1, kDebugSound, "Adlib: Unloading data"); + _adlib->unload(); } @@ -207,7 +227,7 @@ void Sound::adlibPlayTrack(const char *trackname) { if (!_adlib || _adlib->isPlaying()) return; - debugC(1, kDebugMusic, "Adlib::playTrack(%s)", trackname); + debugC(1, kDebugSound, "Adlib: Playing track \"%s\"", trackname); _adlib->unload(); _adlib->load(trackname); @@ -235,6 +255,8 @@ void Sound::adlibPlay() { if (!_adlib) return; + debugC(1, kDebugSound, "Adlib: Starting playback"); + _adlib->startPlay(); } @@ -242,6 +264,8 @@ void Sound::adlibStop() { if (!_adlib) return; + debugC(1, kDebugSound, "Adlib: Stopping playback"); + _adlib->stopPlay(); } @@ -278,6 +302,9 @@ void Sound::blasterPlay(SoundDesc *sndDesc, int16 repCount, if (!_blaster || !sndDesc) return; + debugC(1, kDebugSound, "SoundBlaster: Playing sample (%d, %d, %d)", + repCount, frequency, fadeLength); + _blaster->playSample(*sndDesc, repCount, frequency, fadeLength); } @@ -285,6 +312,8 @@ void Sound::blasterStop(int16 fadeLength, SoundDesc *sndDesc) { if (!_blaster) return; + debugC(1, kDebugSound, "SoundBlaster: Stopping playback"); + _blaster->stopSound(fadeLength, sndDesc); } @@ -293,6 +322,9 @@ void Sound::blasterPlayComposition(int16 *composition, int16 freqVal, if (!_blaster) return; + debugC(1, kDebugSound, "SoundBlaster: Playing composition (%d, %d)", + freqVal, sndCount); + blasterWaitEndPlay(); _blaster->stopComposition(); @@ -306,6 +338,8 @@ void Sound::blasterStopComposition() { if (!_blaster) return; + debugC(1, kDebugSound, "SoundBlaster: Stopping composition"); + _blaster->stopComposition(); } @@ -327,6 +361,8 @@ void Sound::blasterWaitEndPlay(bool interruptible, bool stopComp) { if (!_blaster) return; + debugC(1, kDebugSound, "SoundBlaster: Waiting for playback to end"); + if (stopComp) _blaster->endComposition(); @@ -345,6 +381,8 @@ void Sound::cdLoadLIC(const char *fname) { if (!_cdrom) return; + debugC(1, kDebugSound, "CDROM: Loading LIC \"%s\"", fname); + int handle = _vm->_dataIO->openData(fname); if (handle == -1) @@ -366,6 +404,8 @@ void Sound::cdUnloadLIC() { if (!_cdrom) return; + debugC(1, kDebugSound, "CDROM: Unloading LIC"); + _cdrom->freeLICBuffer(); } @@ -400,6 +440,9 @@ void Sound::cdPlayBgMusic() { for (int i = 0; i < ARRAYSIZE(tracks); i++) if (!scumm_stricmp(_vm->_game->_curTotFile, tracks[i][0])) { + debugC(1, kDebugSound, "CDROM: Playing background music \"%s\" (\"%s\")", + tracks[i][1], _vm->_game->_curTotFile); + _cdrom->startTrack(tracks[i][1]); break; } @@ -422,6 +465,9 @@ void Sound::cdPlayMultMusic() { int language = _vm->_global->_language <= 4 ? _vm->_global->_language : 2; for (int i = 0; i < ARRAYSIZE(tracks); i++) if (!scumm_stricmp(_vm->_game->_curTotFile, tracks[i][0])) { + debugC(1, kDebugSound, "CDROM: Playing mult music \"%s\" (\"%s\")", + tracks[i][language + 1], _vm->_game->_curTotFile); + _cdrom->startTrack(tracks[i][language + 1]); break; } @@ -431,6 +477,7 @@ void Sound::cdPlay(const char *trackName) { if (!_cdrom) return; + debugC(1, kDebugSound, "CDROM: Playing track \"%s\"", trackName); _cdrom->startTrack(trackName); } @@ -438,6 +485,7 @@ void Sound::cdStop() { if (!_cdrom) return; + debugC(1, kDebugSound, "CDROM: Stopping playback"); _cdrom->stopPlaying(); } @@ -473,6 +521,8 @@ void Sound::bgPlay(const char *base, int count) { if (!_bgatmos) return; + debugC(1, kDebugSound, "BackgroundAtmosphere: Playing \"%s\" (%d)", base, count); + _bgatmos->stop(); _bgatmos->queueClear(); @@ -495,6 +545,8 @@ void Sound::bgStop() { if (!_bgatmos) return; + debugC(1, kDebugSound, "BackgroundAtmosphere: Stopping playback"); + _bgatmos->stop(); _bgatmos->queueClear(); } @@ -510,6 +562,8 @@ void Sound::bgShade() { if (!_bgatmos) return; + debugC(1, kDebugSound, "BackgroundAtmosphere: Shading playback"); + _bgatmos->shade(); } @@ -517,6 +571,8 @@ void Sound::bgUnshade() { if (!_bgatmos) return; + debugC(1, kDebugSound, "BackgroundAtmosphere: Unshading playback"); + _bgatmos->unshade(); } |