|
From: <sag...@us...> - 2010-06-11 17:52:49
|
Revision: 620
http://modplug.svn.sourceforge.net/modplug/?rev=620&view=rev
Author: saga-games
Date: 2010-06-11 17:52:43 +0000 (Fri, 11 Jun 2010)
Log Message:
-----------
[Imp] IT Saver: If a mixplug is specified for an IT instrument and no MIDI channel is assigned, the mixplug is written into the IT instrument header (in MPT 1.16's old manner), so that MPT 1.16 / XMPlay / BASS can make us of "FX Send" again. (tx Skaven)
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Load_it.cpp
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2010-06-09 19:44:45 UTC (rev 619)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2010-06-11 17:52:43 UTC (rev 620)
@@ -2048,12 +2048,20 @@
memcpy(iti.name, pIns->name, 26);
iti.mbank = pIns->wMidiBank;
iti.mpr = pIns->nMidiProgram;
- iti.mch = pIns->nMidiChannel;
+ if(pIns->nMidiChannel || pIns->nMixPlug == 0)
+ {
+ // default. prefer midi channel over mixplug to keep the semantics intact.
+ iti.mch = pIns->nMidiChannel;
+ } else
+ {
+ // keep compatibility with MPT 1.16's instrument format if possible, as XMPlay/BASS also uses this.
+ iti.mch = pIns->nMixPlug + 128;
+ }
iti.nna = pIns->nNNA;
//if (pIns->nDCT<DCT_PLUGIN) iti.dct = pIns->nDCT; else iti.dct =0;
iti.dct = pIns->nDCT; //rewbs.instroVSTi: will other apps barf if they get an unknown DCT?
iti.dca = pIns->nDNA;
- iti.fadeout = min(pIns->nFadeOut >> 5 , 256);
+ iti.fadeout = min(pIns->nFadeOut >> 5, 256);
iti.pps = pIns->nPPS;
iti.ppc = pIns->nPPC;
iti.gbv = (BYTE)(pIns->nGlobalVol << 1);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|