Pitch bend range implementation
|Reported by:||SF/jamieson630||Owned by:||fingolfin|
|Game:||Day of the Tentacle|
This patch corrects the pitch bend effect when SCUMMVM is using Windows MMSYSTEM (the - ewindows option).
Pitch bend information was being manipulated before being stored, in order to accomodate value ranges for Adlib output. Consequently, it became almost impossible to reconstruct the appropriate values for MIDI messages -- and in fact, the values being sent out were way out of whack.
The original pitch bend values (which are MIDI- compliant) are now what is being stored. Transformations needed for Adlib are now being performed within Adlib functions.
I tested this patch under -ewindows and -eadlib on Day of the Tentacle, primarily using Green Tentacle's band music and the opening logo sounds. I also checked out more subtle pitch bend effects used during the second cutscene (after Bernard finds the secret lab, through the vortex sequence).
If anybody is using other music systems, please test this! There is a highly convoluted relationship between pitch bends, detunes and transpositions that changes from one driver to the next, so I'm not completely sure that I didn't corrupt the pitch bend values needed by other drivers.
The following revisions are patched: imuse.cpp - Revision 1.12 mididrv.cpp - Revision 1.5
(Note: There are a couple miscellaneous tab-indent corrections in this patch as well, just to get things in line with cosmetic guidelines.)
Ticket imported from: #614005. Ticket imported from: patches/169.