mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 11:46:25 +01:00
Allow input meters without session when backend is connected
This also fixes a race with ARDOUR::AudioEngine::start() emitting a Running() signal being emitted without a valid session.
This commit is contained in:
parent
265f5d8342
commit
43f58f88a6
1 changed files with 14 additions and 9 deletions
|
|
@ -560,13 +560,16 @@ RecorderUI::start_updating ()
|
||||||
|
|
||||||
size_t iop_audio = 0;
|
size_t iop_audio = 0;
|
||||||
size_t iop_midi = 0;
|
size_t iop_midi = 0;
|
||||||
boost::shared_ptr<IOPlugList> iop (_session->io_plugs ());
|
boost::shared_ptr<IOPlugList> iop;
|
||||||
|
if (_session) {
|
||||||
|
iop = _session->io_plugs ();
|
||||||
for (auto& p : *iop) {
|
for (auto& p : *iop) {
|
||||||
PortManager::AudioInputPorts const& aip (p->audio_input_ports ());
|
PortManager::AudioInputPorts const& aip (p->audio_input_ports ());
|
||||||
PortManager::MIDIInputPorts const& mip (p->midi_input_ports ());
|
PortManager::MIDIInputPorts const& mip (p->midi_input_ports ());
|
||||||
iop_audio += aip.size ();
|
iop_audio += aip.size ();
|
||||||
iop_midi += mip.size ();
|
iop_midi += mip.size ();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (aip.size () + mip.size () + iop_audio + iop_midi == 0) {
|
if (aip.size () + mip.size () + iop_audio + iop_midi == 0) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -604,9 +607,11 @@ RecorderUI::start_updating ()
|
||||||
set_connections (i->first);
|
set_connections (i->first);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto& p : *iop) {
|
if (iop) {
|
||||||
|
for (auto const& p : *iop) {
|
||||||
io_plugin_add (p);
|
io_plugin_add (p);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
update_io_widget_labels ();
|
update_io_widget_labels ();
|
||||||
meter_area_layout ();
|
meter_area_layout ();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue