[Scummvm-devel] [Scummvm-cvs-logs] SF.net SVN: scummvm:[48147] scummvm/trunk/engines/draci/music.cpp

Jordi Vilalta jvprat at users.sourceforge.net
Sun Feb 28 00:01:48 CET 2010


Hi,

2010/2/27 Robert Špalek:
> thank you very much!
> out of curiosity, when could it happen that the channel cannot be allocated?
>  is it that on some architectures, although MIDI is supported in general
> (and thus enabled in the game engine), some channels (perhaps above some
> limit) fail to allocate?

I've learned it while investigating this bug. I think the MIDI
standard doesn't tell how many channels must be available, so each
MIDI driver keeps a mask of his allocatable channels. The default mask
allows allocating channels 0 to 15. It seems the MT32 synthesizers
don't have that many channels and engines set an appropriate mask in
order not to send useless data to it.

The draci engine also changes the channel masfor MT32 devices in line
132 of draci.cpp:
_midiDriver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE);

I hope it solves the mystery ;)




More information about the Scummvm-devel mailing list