summaryrefslogtreecommitdiff
path: root/muse2/muse/vst_native.cpp
diff options
context:
space:
mode:
authorTim E. Real <termtech@rogers.com>2012-12-10 02:31:35 +0000
committerTim E. Real <termtech@rogers.com>2012-12-10 02:31:35 +0000
commitf26abd714f485fa04c3b1480cd0c712403d74e8f (patch)
tree94fe30bf80f32c7defa55bbb8485bff62e9afc0c /muse2/muse/vst_native.cpp
parent4679425f17799eacd79941287c979a10f2e6b990 (diff)
Fix VST names: Use filename if effect name or product name blank.
Fix bug 3594221: End-to-end midi notes don't retrigger. My bad.
Diffstat (limited to 'muse2/muse/vst_native.cpp')
-rw-r--r--muse2/muse/vst_native.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/muse2/muse/vst_native.cpp b/muse2/muse/vst_native.cpp
index 8cc16227..4cfc6113 100644
--- a/muse2/muse/vst_native.cpp
+++ b/muse2/muse/vst_native.cpp
@@ -302,6 +302,7 @@ static void scanVstNativeLib(QFileInfo& fi)
QString effectName;
QString vendorString;
QString productString;
+ int vendorVersion;
std::vector<Synth*>::iterator is;
int vst_version = 0;
VstNativeSynth* new_synth = NULL;
@@ -382,6 +383,14 @@ static void scanVstNativeLib(QFileInfo& fi)
plugin->dispatcher(plugin, effGetProductString, 0, 0, buffer, 0);
if (buffer[0])
productString = QString(buffer);
+
+ vendorVersion = plugin->dispatcher(plugin, effGetVendorVersion, 0, 0, NULL, 0);
+
+ if(effectName.isEmpty())
+ effectName = fi.completeBaseName();
+ if(productString.isEmpty())
+ //productString = fi.completeBaseName();
+ productString = effectName;
// Make sure it doesn't already exist.
for(is = MusEGlobal::synthis.begin(); is != MusEGlobal::synthis.end(); ++is)
@@ -397,7 +406,7 @@ static void scanVstNativeLib(QFileInfo& fi)
goto _ending;
}
- new_synth = new VstNativeSynth(fi, plugin, effectName, productString, vendorString, QString()); // TODO Version string?
+ new_synth = new VstNativeSynth(fi, plugin, effectName, productString, vendorString, QString::number(vendorVersion));
if(MusEGlobal::debugMsg)
fprintf(stderr, "scanVstNativeLib: adding vst synth plugin:%s name:%s effectName:%s vendorString:%s productString:%s vstver:%d\n",
@@ -1019,9 +1028,9 @@ VstIntPtr VstNativeSynthIF::hostCallback(VstInt32 opcode, VstInt32 index, VstInt
case audioMasterCanDo:
// string in ptr, see below
if(!strcmp((char*)ptr, "sendVstEvents") ||
- !strcmp((char*)ptr, "receiveVstMidiEvent") ||
+ // !strcmp((char*)ptr, "receiveVstMidiEvent") || // TODO
!strcmp((char*)ptr, "sendVstMidiEvent") ||
- !strcmp((char*)ptr, "sendVstTimeInfo") ||
+ // !strcmp((char*)ptr, "sendVstTimeInfo") || // TODO
!strcmp((char*)ptr, "sizeWindow") ||
!strcmp((char*)ptr, "supplyIdle"))
return 1;
@@ -1228,15 +1237,6 @@ void VstNativeSynthIF::showNativeGui(bool v)
| Qt::WindowCloseButtonHint;
_editor = new MusEGui::VstNativeEditor(NULL, wflags);
_editor->open(this);
-
- // TODO TEST Test if these might be helpful, especially opaque event.
- // _editor->setBackgroundRole(QPalette::NoRole);
- // _editor->setAttribute(Qt::WA_NoSystemBackground);
- // _editor->setAttribute(Qt::WA_StaticContents);
- // // This is absolutely required for speed! Otherwise painfully slow because of full background
- // // filling, even when requesting small udpdates! Background is drawn by us.
- // _editor->setAttribute(Qt::WA_OpaquePaintEvent);
- // //_editor->setFrameStyle(QFrame::Raised | QFrame::StyledPanel);
}
}
else