scummvm/scummvm — pull request #279 by lordhoto (2012-09-20 00:33:26+00:00)
Title: Add support for Monkey Island 2 Mac sound.

This implements the Monkey Island 2 Mac sound output for SCUMM. This should probably also cover Indy4 Mac m68k, but I can't test this. Also there's a Indy4 Mac PPC version, which does not use this driver. So here some there's need to put some thought into how to dinstinguish these.

Sadly our iMuse implementation misses some abstractions. Thus this required two changes to iMuse. The first is that the tracks used by MI2 Mac are using MIDI style program changes, but do not have a percussion channel. So instead of relying on _isMIDI for detection whether a percussion channel is present, I addded a new flag _supportsPercussion. The next one is a bit more sad. Since MI2 Mac's output distinguishes whether the program is changed via a standard MIDI program change event or via the iMuse SysEx handler, I needed to add a new Instrument subclass and do checks in Part::set_instrument to handle this. This is not so nice, but there's hardly a way around that without changing MidiChannel further... But such a MidiChannel change would be the wrong direction, since most of the MidiChannel functionality is pretty SCUMM specific right now too and fuzzie showed some interest in changing that.

I tested the Monkey Island 2 intro and parts of Woodtick and that seems to work fine, but I don't have a real Mac to test this against. clone2727 volutneered to test this further.