From b23ef978452f1f69d99fa9c04fe3ced9ee7450d4 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 3 Apr 2016 18:28:33 +0200 Subject: add Plugin API to query port-labels and side-chain property. --- libs/ardour/plugin.cc | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'libs/ardour/plugin.cc') 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) { -- cgit v1.2.3