13
0

RecorderUI: Do not show input meters for control-only ports Faderport, Mackie, etc

This commit is contained in:
Ben Loftis 2021-08-04 09:13:55 -05:00
parent 2007bf2d5f
commit f67d39fa66

View File

@ -583,6 +583,10 @@ RecorderUI::start_updating ()
/* MIDI */ /* MIDI */
for (PortManager::MIDIInputPorts::const_iterator i = mip.begin (); i != mip.end (); ++i) { for (PortManager::MIDIInputPorts::const_iterator i = mip.begin (); i != mip.end (); ++i) {
string pn = AudioEngine::instance()->get_pretty_name_by_name (i->first);
if (PortManager::port_is_control_only (pn)) {
continue;
}
_input_ports[i->first] = boost::shared_ptr<RecorderUI::InputPort> (new InputPort (i->first, DataType::MIDI, this, _vertical)); _input_ports[i->first] = boost::shared_ptr<RecorderUI::InputPort> (new InputPort (i->first, DataType::MIDI, this, _vertical));
set_connections (i->first); set_connections (i->first);
} }
@ -631,6 +635,10 @@ RecorderUI::add_or_remove_io (DataType dt, vector<string> ports, bool add)
if (add) { if (add) {
for (vector<string>::const_iterator i = ports.begin (); i != ports.end (); ++i) { for (vector<string>::const_iterator i = ports.begin (); i != ports.end (); ++i) {
string pn = AudioEngine::instance()->get_pretty_name_by_name (*i);
if (dt==DataType::MIDI && PortManager::port_is_control_only (pn)) {
continue;
}
_input_ports[*i] = boost::shared_ptr<RecorderUI::InputPort> (new InputPort (*i, dt, this, _vertical)); _input_ports[*i] = boost::shared_ptr<RecorderUI::InputPort> (new InputPort (*i, dt, this, _vertical));
set_connections (*i); set_connections (*i);
} }
@ -705,8 +713,10 @@ RecorderUI::update_meters ()
PortManager::MIDIInputPorts const mip (AudioEngine::instance ()->midi_input_ports ()); PortManager::MIDIInputPorts const mip (AudioEngine::instance ()->midi_input_ports ());
for (PortManager::MIDIInputPorts::const_iterator i = mip.begin (); i != mip.end (); ++i) { for (PortManager::MIDIInputPorts::const_iterator i = mip.begin (); i != mip.end (); ++i) {
InputPortMap::iterator im = _input_ports.find (i->first); InputPortMap::iterator im = _input_ports.find (i->first);
im->second->update ((float const*)i->second.meter->chn_active); if (im != _input_ports.end()) {
im->second->update (*(i->second.monitor)); im->second->update ((float const*)i->second.meter->chn_active);
im->second->update (*(i->second.monitor));
}
} }
for (list<TrackRecordAxis*>::const_iterator i = _recorders.begin (); i != _recorders.end (); ++i) { for (list<TrackRecordAxis*>::const_iterator i = _recorders.begin (); i != _recorders.end (); ++i) {