summaryrefslogtreecommitdiff
path: root/libs/ardour/plugin.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-04-03 18:28:33 +0200
committerRobin Gareus <robin@gareus.org>2016-04-03 22:45:23 +0200
commitb23ef978452f1f69d99fa9c04fe3ced9ee7450d4 (patch)
treed4deb72492249ed2d76049edd1e64346578a8dce /libs/ardour/plugin.cc
parentfe1985c3e3cfbaa73c8986710f97afc1cfbe076b (diff)
add Plugin API to query port-labels and side-chain property.
Diffstat (limited to 'libs/ardour/plugin.cc')
-rw-r--r--libs/ardour/plugin.cc27
1 files changed, 27 insertions, 0 deletions
diff --git a/libs/ardour/plugin.cc b/libs/ardour/plugin.cc
index 4bb5b02c77..61141301cb 100644
--- a/libs/ardour/plugin.cc
+++ b/libs/ardour/plugin.cc
@@ -257,6 +257,33 @@ Plugin::input_streams () const
return ChanCount::ZERO;
}
+Plugin::IOPortDescription
+Plugin::describe_io_port (ARDOUR::DataType dt, bool input, uint32_t id)
+{
+ std::stringstream ss;
+ switch (dt) {
+ case DataType::AUDIO:
+ ss << _("Audio") << " ";
+ break;
+ case DataType::MIDI:
+ ss << _("Midi") << " ";
+ break;
+ default:
+ ss << _("?") << " ";
+ break;
+ }
+ if (input) {
+ ss << _("In") << " ";
+ } else {
+ ss << _("Out") << " ";
+ }
+
+ ss << id;
+
+ Plugin::IOPortDescription iod (ss.str());
+ return iod;
+}
+
const Plugin::PresetRecord *
Plugin::preset_by_label (const string& label)
{