SCI: implementing fading for sci1 only for used channels of the object, fixes lsl1 music issues when going right at the start

svn-id: r50018
This commit is contained in:
Martin Kiewitz 2010-06-18 13:36:29 +00:00
parent 661a170c86
commit 562f8a9463
2 changed files with 7 additions and 4 deletions

View File

@ -646,10 +646,10 @@ void MidiParser_SCI::setVolume(byte volume) {
case SCI_VERSION_1_EARLY:
case SCI_VERSION_1_LATE:
// sending volume change to all active channels
for (int i = 0; i < _track->channelCount; i++)
if (_track->channels[i].number <= 0xF)
_driver->send(0xB0 + _track->channels[i].number, 7, _volume);
// sending volume change to all used channels
for (int i = 0; i < 15; i++)
if (_channelUsed[i])
sendToDriver(0xB0 + i, 7, _volume);
break;
default:

View File

@ -77,6 +77,9 @@ public:
void tryToOwnChannels();
void sendToDriver(uint32 b);
void sendToDriver(byte status, byte firstOp, byte secondOp) {
sendToDriver(status | ((uint32)firstOp << 8) | ((uint32)secondOp << 16));
}
protected:
void parseNextEvent(EventInfo &info);