summaryrefslogtreecommitdiff
path: root/pluginvst.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2016-03-20 09:51:17 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2016-03-20 09:51:17 +0100
commitb4103bd5a37e5da1429d723fb5c5d7e28385ff23 (patch)
treef83650d6123284fd1668f6926f436b2c68f0f7d5 /pluginvst.cc
parent9e6dbac98ab9cd9f92a2700d783a935fb8828d87 (diff)
Add getInputProperties/getOutputProperties VST methods.
Diffstat (limited to 'pluginvst.cc')
-rw-r--r--pluginvst.cc34
1 files changed, 34 insertions, 0 deletions
diff --git a/pluginvst.cc b/pluginvst.cc
index 33eb1b8..7de518e 100644
--- a/pluginvst.cc
+++ b/pluginvst.cc
@@ -169,6 +169,40 @@ void PluginVST::resume()
onActiveChange(active);
}
+bool PluginVST::getInputProperties(VstInt32 index, VstPinProperties* props)
+{
+ if(index < (VstInt32)getNumberOfAudioInputs())
+ {
+ vst_strncpy(props->label, "Channel ", 63);
+ char temp[11] = {0};
+ int2string(index + 1, temp, 10);
+ vst_strncat(props->label, temp, 63);
+
+ props->flags = kVstPinIsActive;
+
+ return true;
+ }
+
+ return false;
+}
+
+bool PluginVST::getOutputProperties(VstInt32 index, VstPinProperties* props)
+{
+ if(index < (VstInt32)getNumberOfAudioOutputs())
+ {
+ vst_strncpy(props->label, "Channel ", 63);
+ char temp[11] = {0};
+ int2string(index + 1, temp, 10);
+ vst_strncat(props->label, temp, 63);
+
+ props->flags = kVstPinIsActive;
+
+ return true;
+ }
+
+ return false;
+}
+
void PluginVST::setSampleRate(float sampleRate)
{
// Called when the sample rate changes (always in a suspend state).