diff options
author | Filippos Karapetis | 2010-06-12 11:41:22 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-06-12 11:41:22 +0000 |
commit | f4739f9f68026d5e3ea3304777260cef3101a031 (patch) | |
tree | de77b05835741f85608bdb35661988d567aafda2 /engines/sci/sound/midiparser_sci.cpp | |
parent | 277a700e6743b481eba8efb86fe37c339d880279 (diff) | |
download | scummvm-rg350-f4739f9f68026d5e3ea3304777260cef3101a031.tar.gz scummvm-rg350-f4739f9f68026d5e3ea3304777260cef3101a031.tar.bz2 scummvm-rg350-f4739f9f68026d5e3ea3304777260cef3101a031.zip |
Added debug output to kDoAudio and some music commands. Also added a warning when an audio stream can't be created. Finally, the debug level of the MIDI parser debug output has been raised to 4, as it's too verbose
svn-id: r49605
Diffstat (limited to 'engines/sci/sound/midiparser_sci.cpp')
-rw-r--r-- | engines/sci/sound/midiparser_sci.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/engines/sci/sound/midiparser_sci.cpp b/engines/sci/sound/midiparser_sci.cpp index f852367bfe..bb353da780 100644 --- a/engines/sci/sound/midiparser_sci.cpp +++ b/engines/sci/sound/midiparser_sci.cpp @@ -148,12 +148,12 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) { _dataincAdd = false; _pSnd->dataInc += _dataincToAdd; _pSnd->signal = 0x7f + _pSnd->dataInc; - debugC(2, kDebugLevelSound, "datainc %04x", _dataincToAdd); + debugC(4, kDebugLevelSound, "datainc %04x", _dataincToAdd); } if (_signalSet) { _signalSet = false; _pSnd->signal = _signalToSet; - debugC(2, kDebugLevelSound, "signal %04x", _signalToSet); + debugC(4, kDebugLevelSound, "signal %04x", _signalToSet); } info.start = _position._play_pos; @@ -313,7 +313,7 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) { _pSnd->status = kSoundStopped; _pSnd->signal = SIGNAL_OFFSET; - debugC(2, kDebugLevelSound, "signal EOT"); + debugC(4, kDebugLevelSound, "signal EOT"); } } break; @@ -376,21 +376,21 @@ byte *MidiParser_SCI::midiMixChannels() { command = *channel->data++; if (command != kEndOfTrack) { - debugC(2, kDebugLevelSound, "\nDELTA "); + debugC(4, kDebugLevelSound, "\nDELTA "); // Write delta while (new_delta > 240) { *outData++ = 0xF8; - debugC(2, kDebugLevelSound, "F8 "); + debugC(4, kDebugLevelSound, "F8 "); new_delta -= 240; } *outData++ = (byte)new_delta; - debugC(2, kDebugLevelSound, "%02X ", (uint32)new_delta); + debugC(4, kDebugLevelSound, "%02X ", (uint32)new_delta); } // Write command switch (command) { case 0xF0: // sysEx *outData++ = command; - debugC(2, kDebugLevelSound, "%02X ", command); + debugC(4, kDebugLevelSound, "%02X ", command); do { par1 = *channel->data++; *outData++ = par1; // out @@ -478,22 +478,22 @@ byte *MidiParser_SCI::midiFilterChannels(int channelMask) { } if ((1 << curChannel) & channelMask) { if (command != kEndOfTrack) { - debugC(2, kDebugLevelSound, "\nDELTA "); + debugC(4, kDebugLevelSound, "\nDELTA "); // Write delta while (delta > 240) { *outData++ = 0xF8; - debugC(2, kDebugLevelSound, "F8 "); + debugC(4, kDebugLevelSound, "F8 "); delta -= 240; } *outData++ = (byte)delta; - debugC(2, kDebugLevelSound, "%02X ", delta); + debugC(4, kDebugLevelSound, "%02X ", delta); delta = 0; } // Write command switch (command) { case 0xF0: // sysEx *outData++ = command; - debugC(2, kDebugLevelSound, "%02X ", command); + debugC(4, kDebugLevelSound, "%02X ", command); do { curByte = *channelData++; *outData++ = curByte; // out @@ -507,20 +507,20 @@ byte *MidiParser_SCI::midiFilterChannels(int channelMask) { default: // MIDI command if (lastCommand != command) { *outData++ = command; - debugC(2, kDebugLevelSound, "%02X ", command); + debugC(4, kDebugLevelSound, "%02X ", command); lastCommand = command; } if (midiParamCount > 0) { if (curByte & 0x80) { - debugC(2, kDebugLevelSound, "%02X ", *channelData); + debugC(4, kDebugLevelSound, "%02X ", *channelData); *outData++ = *channelData++; } else { - debugC(2, kDebugLevelSound, "%02X ", curByte); + debugC(4, kDebugLevelSound, "%02X ", curByte); *outData++ = curByte; } } if (midiParamCount > 1) { - debugC(2, kDebugLevelSound, "%02X ", *channelData); + debugC(4, kDebugLevelSound, "%02X ", *channelData); *outData++ = *channelData++; } } |