diff options
-rw-r--r-- | scumm/smush/smush_mixer.cpp | 11 | ||||
-rw-r--r-- | scumm/smush/smush_mixer.h | 1 |
2 files changed, 5 insertions, 7 deletions
diff --git a/scumm/smush/smush_mixer.cpp b/scumm/smush/smush_mixer.cpp index 69a5cf6993..e5a41799d4 100644 --- a/scumm/smush/smush_mixer.cpp +++ b/scumm/smush/smush_mixer.cpp @@ -35,7 +35,7 @@ SmushMixer::SmushMixer(SoundMixer *m) : for (int32 i = _mixer->_beginSlots; i < SoundMixer::NUM_CHANNELS; i++) { _channels[i].id = -1; _channels[i].chan = NULL; - _channels[i].first = true; + _channels[i].mixer_index = -1; } } @@ -68,7 +68,7 @@ bool SmushMixer::addChannel(SmushChannel *c) { if (_channels[i].chan == NULL || _channels[i].id == -1) { _channels[i].chan = c; _channels[i].id = track; - _channels[i].first = true; + _channels[i].mixer_index = -1; _nextIndex = i + 1; return true; } @@ -78,7 +78,7 @@ bool SmushMixer::addChannel(SmushChannel *c) { if (_channels[i].chan == NULL || _channels[i].id == -1) { _channels[i].chan = c; _channels[i].id = track; - _channels[i].first = true; + _channels[i].mixer_index = -1; _nextIndex = i + 1; return true; } @@ -90,7 +90,7 @@ bool SmushMixer::addChannel(SmushChannel *c) { warning("channel %d : %p(%d, %d) %d %d", i, (void *)_channels[i].chan, _channels[i].chan ? _channels[i].chan->getTrackIdentifier() : -1, _channels[i].chan ? _channels[i].chan->isTerminated() : 1, - _channels[i].first, _channels[i].mixer_index); + _channels[i].mixer_index); } error("SmushMixer::add_channel() : no more channel available"); @@ -134,9 +134,8 @@ bool SmushMixer::handleFrame() { } if (_silentMixer == false) { - if (_channels[i].first) { + if (_channels[i].mixer_index == -1) { _channels[i].mixer_index = _mixer->playStream(NULL, -1, data, size, rate, flags); - _channels[i].first = false; } else { _mixer->append(_channels[i].mixer_index, data, size, rate, flags); } diff --git a/scumm/smush/smush_mixer.h b/scumm/smush/smush_mixer.h index e12014c9a2..6a62f786d4 100644 --- a/scumm/smush/smush_mixer.h +++ b/scumm/smush/smush_mixer.h @@ -32,7 +32,6 @@ private: struct { int id; SmushChannel *chan; - bool first; int mixer_index; } _channels[SoundMixer::NUM_CHANNELS]; |