13
0

Static input port meters, ignore dynamic ports for now

Hotplugging devices will need to be special-cased.
Currently there is no API to notify the PortManager about
hotplugged devices.
This commit is contained in:
Robin Gareus 2021-01-14 01:47:25 +01:00
parent c803911873
commit fa791ae9cc
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -1487,6 +1487,11 @@ PortManager::run_input_meters (pframes_t n_samples, samplecnt_t rate)
continue;
}
if (_audio_port_meters.find (*p) == _audio_port_meters.end () || _audio_port_scopes.find (*p) == _audio_port_scopes.end ()) {
/* do not allocate ports during normal operation */
continue;
}
if (reset) {
_audio_port_meters[*p].reset ();
}
@ -1530,6 +1535,11 @@ PortManager::run_input_meters (pframes_t n_samples, samplecnt_t rate)
continue;
}
if (_midi_port_meters.find (*p) == _midi_port_meters.end () || _midi_port_monitors.find (*p) == _midi_port_monitors.end ()) {
/* do not allocate ports during normal operation */
continue;
}
for (size_t i = 0; i < 17; ++i) {
/* falloff */
if (_midi_port_meters[*p].chn_active[i] > 1e-10) {