From: <sag...@us...> - 2010-12-18 19:08:14
|
Revision: 774 http://modplug.svn.sourceforge.net/modplug/?rev=774&view=rev Author: saga-games Date: 2010-12-18 19:08:08 +0000 (Sat, 18 Dec 2010) Log Message: ----------- [Fix] VST Handling: Speaker arrangement is now sent to the plugins upon initialization. This fixes Voxengo SPAN 2 (a VST 2.4 plugin). Does this break other multichannel plugins? [Mod] OpenMPT: Version is now 1.19.00.16 Modified Paths: -------------- trunk/OpenMPT/mptrack/Vstplug.cpp trunk/OpenMPT/mptrack/version.h Modified: trunk/OpenMPT/mptrack/Vstplug.cpp =================================================================== --- trunk/OpenMPT/mptrack/Vstplug.cpp 2010-12-18 19:06:01 UTC (rev 773) +++ trunk/OpenMPT/mptrack/Vstplug.cpp 2010-12-18 19:08:08 UTC (rev 774) @@ -1728,7 +1728,7 @@ void CVstPlugin::Initialize(CSoundFile* pSndFile) -//------------------------------------------- +//----------------------------------------------- { if (!m_pEvList) { @@ -1759,7 +1759,38 @@ m_bIsVst2 = (CVstPlugin::Dispatch(effGetVstVersion, 0,0, NULL, 0) >= 2) ? TRUE : FALSE; if (m_bIsVst2) { - // Dummy pin properies collection. + // Set VST speaker in/out setup to Stereo. Required for some plugins (possibly all VST 2.4+ plugins?) + // All this might get more interesting when adding sidechaining support... + VstSpeakerArrangement sa; + MemsetZero(sa); + sa.numChannels = 2; + sa.type = kSpeakerArrStereo; + for(int i = 0; i < ARRAYELEMCOUNT(sa.speakers); i++) + { + sa.speakers[i].azimuth = 0; + sa.speakers[i].elevation = 0; + sa.speakers[i].radius = 0; + sa.speakers[i].reserved = 0.0f; + // For now, only left and right speaker are used. + switch(i) + { + case 0: + sa.speakers[i].type = kSpeakerL; + strcpy(sa.speakers[i].name, "Left"); + break; + case 1: + sa.speakers[i].type = kSpeakerR; + strcpy(sa.speakers[i].name, "Right"); + break; + default: + sa.speakers[i].type = kSpeakerUndefined; + break; + } + } + // For now, input setup = output setup. + Dispatch(effSetSpeakerArrangement, 0, (LONG_PTR)(&sa), &sa, 0.0f); + + // Dummy pin properties collection. // We don't use them but some plugs might do inits in here. VstPinProperties tempPinProperties; Dispatch(effGetInputProperties, 0, 0, &tempPinProperties, 0); Modified: trunk/OpenMPT/mptrack/version.h =================================================================== --- trunk/OpenMPT/mptrack/version.h 2010-12-18 19:06:01 UTC (rev 773) +++ trunk/OpenMPT/mptrack/version.h 2010-12-18 19:08:08 UTC (rev 774) @@ -15,7 +15,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 19 #define VER_MINOR 00 -#define VER_MINORMINOR 15 +#define VER_MINORMINOR 16 //Creates version number from version parts that appears in version string. //For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |