diff options
author | Robin Gareus <robin@gareus.org> | 2016-03-31 20:28:48 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-03-31 20:28:48 +0200 |
commit | 884cb355230d293233e599bdfebae7f67684a48e (patch) | |
tree | 8ff73fb9c2e28fef6cc80f0e23abfce8ca645580 /libs/ardour/chan_mapping.cc | |
parent | 3ec33cccbeb1be58724b9a5ca522fdfd70038db8 (diff) |
plugin-pin-map:
* fix MIDI-bypass
* prepare combined channel-map report (for GUI)
* fix route failed config return
Diffstat (limited to 'libs/ardour/chan_mapping.cc')
-rw-r--r-- | libs/ardour/chan_mapping.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libs/ardour/chan_mapping.cc b/libs/ardour/chan_mapping.cc index 0ca79af505..6386c2863b 100644 --- a/libs/ardour/chan_mapping.cc +++ b/libs/ardour/chan_mapping.cc @@ -67,6 +67,26 @@ ChanMapping::get(DataType t, uint32_t from, bool* valid) const return m->second; } +uint32_t +ChanMapping::get_src(DataType t, uint32_t to, bool* valid) const +{ + Mappings::const_iterator tm = _mappings.find(t); + if (tm == _mappings.end()) { + if (valid) { *valid = false; } + return -1; + } + for (TypeMapping::const_iterator i = tm->second.begin(); i != tm->second.end(); ++i) { + if (i->second == to) { + if (valid) { *valid = true; } + return i->first; + } + } + if (valid) { *valid = false; } + return -1; +} + + + void ChanMapping::set(DataType t, uint32_t from, uint32_t to) { |