diff options
author | Paweł Kołodziejski | 2008-01-19 16:06:20 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2008-01-19 16:06:20 +0000 |
commit | 72d59da6cb42f354f8e1b786858d573c0740f9ae (patch) | |
tree | 8a12dc46a3f4906f3d75fa6d85cbeb2151189862 /engines/scumm/imuse_digi/dimuse_track.cpp | |
parent | 00de5113350caefc542244c5f9f75ee7d153bd4c (diff) | |
download | scummvm-rg350-72d59da6cb42f354f8e1b786858d573c0740f9ae.tar.gz scummvm-rg350-72d59da6cb42f354f8e1b786858d573c0740f9ae.tar.bz2 scummvm-rg350-72d59da6cb42f354f8e1b786858d573c0740f9ae.zip |
missed setting trackId while starSound,
added more debug output,
verification of jump code, it might have regressions
svn-id: r30565
Diffstat (limited to 'engines/scumm/imuse_digi/dimuse_track.cpp')
-rw-r--r-- | engines/scumm/imuse_digi/dimuse_track.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/engines/scumm/imuse_digi/dimuse_track.cpp b/engines/scumm/imuse_digi/dimuse_track.cpp index d91e272c2d..00ec708438 100644 --- a/engines/scumm/imuse_digi/dimuse_track.cpp +++ b/engines/scumm/imuse_digi/dimuse_track.cpp @@ -83,13 +83,14 @@ int IMuseDigital::allocSlot(int priority) { void IMuseDigital::startSound(int soundId, const char *soundName, int soundType, int volGroupId, Audio::AudioStream *input, int hookId, int volume, int priority, Track *otherTrack) { Common::StackLock lock(_mutex, "IMuseDigital::startSound()"); - debug(5, "IMuseDigital::startSound(%d)", soundId); + debug(5, "IMuseDigital::startSound(%d) - begin func", soundId); int l = allocSlot(priority); if (l == -1) { warning("IMuseDigital::startSound() Can't start sound - no free slots"); return; } + debug(5, "IMuseDigital::startSound(%d)(trackId:%d)", soundId, l); Track *track = _track[l]; @@ -104,6 +105,7 @@ void IMuseDigital::startSound(int soundId, const char *soundName, int soundType, track->soundPriority = priority; track->curRegion = -1; track->soundType = soundType; + track->trackId = l; int bits = 0, freq = 0, channels = 0; @@ -329,10 +331,10 @@ Track *IMuseDigital::cloneToFadeOutTrack(Track *track, int fadeDelay) { assert(track); Track *fadeTrack; - debug(0, "IMuseDigital::cloneToFadeOutTrack(%d, %d)", track->trackId, fadeDelay); + debug(5, "cloneToFadeOutTrack(%d, %d) - begin of func", track->trackId, fadeDelay); if (track->toBeRemoved) { - error("IMuseDigital::cloneToFadeOutTrack: Tried to clone a track to be removed"); + error("cloneToFadeOutTrack: Tried to clone a track to be removed. exit func"); return NULL; } @@ -340,7 +342,7 @@ Track *IMuseDigital::cloneToFadeOutTrack(Track *track, int fadeDelay) { fadeTrack = _track[track->trackId + MAX_DIGITAL_TRACKS]; if (fadeTrack->used) { - warning("IMuseDigital::cloneToFadeOutTrack: No free fade track, force flush"); + warning("cloneToFadeOutTrack: No free fade track, force flush"); flushTrack(fadeTrack); _mixer->stopHandle(fadeTrack->mixChanHandle); } @@ -364,6 +366,8 @@ Track *IMuseDigital::cloneToFadeOutTrack(Track *track, int fadeDelay) { _mixer->playInputStream(track->getType(), &fadeTrack->mixChanHandle, fadeTrack->stream, -1, fadeTrack->getVol(), fadeTrack->getPan()); fadeTrack->used = true; + debug(5, "cloneToFadeOutTrack() - end of func, track %d, fadeTrackId %d", track->trackId, fadeTrack->trackId); + return fadeTrack; } |