mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 12:39:56 +00:00
SCI: Fix rhythm channel handling in SCI0
svn-id: r47326
This commit is contained in:
parent
d1733bcf15
commit
6caf8e3f89
@ -2077,7 +2077,7 @@ SoundResource::Track *SoundResource::getDigitalTrack() {
|
||||
}
|
||||
|
||||
// Gets the filter mask for SCI0 sound resources
|
||||
int SoundResource::getChannelFilterMask(int hardwareMask) {
|
||||
int SoundResource::getChannelFilterMask(int hardwareMask, bool wantsRhythm) {
|
||||
byte *data = _innerResource->data;
|
||||
int channelMask = 0;
|
||||
int reverseHardwareMask = 0;
|
||||
@ -2130,6 +2130,11 @@ int SoundResource::getChannelFilterMask(int hardwareMask) {
|
||||
}
|
||||
// Play channel 15 at all times (control channel)
|
||||
channelMask |= 0x8000;
|
||||
|
||||
channelMask &= ~(1 << 9);
|
||||
if (wantsRhythm)
|
||||
channelMask |= (1 << 9);
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -473,7 +473,7 @@ public:
|
||||
#endif
|
||||
Track *getTrackByType(byte type);
|
||||
Track *getDigitalTrack();
|
||||
int getChannelFilterMask(int hardwareMask);
|
||||
int getChannelFilterMask(int hardwareMask, bool wantsRhythm);
|
||||
|
||||
private:
|
||||
SciVersion _soundVersion;
|
||||
|
@ -316,14 +316,7 @@ void SciMusic::soundInitSnd(MusicEntry *pSnd) {
|
||||
pSnd->pauseCounter = 0;
|
||||
|
||||
// Find out what channels to filter for SCI0
|
||||
channelFilterMask = pSnd->soundRes->getChannelFilterMask(_pMidiDrv->getPlayId(_soundVersion));
|
||||
|
||||
// Enable rhythm channel when requested
|
||||
// FIXME: this causes crashes and/or oddities for newer games (SCI1+)
|
||||
/*channelFilterMask &= ~(1 << MIDI_RHYTHM_CHANNEL);
|
||||
if (_pMidiDrv->hasRhythmChannel())
|
||||
channelFilterMask |= (1 << MIDI_RHYTHM_CHANNEL);*/
|
||||
|
||||
channelFilterMask = pSnd->soundRes->getChannelFilterMask(_pMidiDrv->getPlayId(_soundVersion), _pMidiDrv->hasRhythmChannel());
|
||||
pSnd->pMidiParser->loadMusic(track, pSnd, channelFilterMask, _soundVersion);
|
||||
|
||||
// Fast forward to the last position and perform associated events when loading
|
||||
|
Loading…
Reference in New Issue
Block a user