mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 00:34:59 +01:00
ALSA|Dummy: ignore port unregistration when engine is stopped
When changing Engine parameters, ardour first stops the engine and only later when re-etablishing ports unregisters/re-registers them. ALSA: silently ignore port unregs and silently accept registrations Dummy: print a PBD::info message,
This commit is contained in:
parent
dc318e6e74
commit
b1da9af8de
2 changed files with 9 additions and 4 deletions
|
|
@ -595,6 +595,9 @@ DummyAudioBackend::register_port (
|
|||
{
|
||||
if (name.size () == 0) { return 0; }
|
||||
if (flags & IsPhysical) { return 0; }
|
||||
if (!_running) {
|
||||
PBD::info << _("DummyBackend::register_port: Engine is not running.") << endmsg;
|
||||
}
|
||||
return add_port (_instance_name + ":" + name, type, flags);
|
||||
}
|
||||
|
||||
|
|
@ -631,8 +634,10 @@ DummyAudioBackend::add_port (
|
|||
void
|
||||
DummyAudioBackend::unregister_port (PortEngine::PortHandle port_handle)
|
||||
{
|
||||
if (!valid_port (port_handle)) {
|
||||
PBD::error << _("DummyBackend::unregister_port: Invalid Port.") << endmsg;
|
||||
if (!_running) {
|
||||
PBD::info << _("DummyBackend::unregister_port: Engine is not running.") << endmsg;
|
||||
assert (!valid_port (port_handle));
|
||||
return;
|
||||
}
|
||||
DummyPort* port = static_cast<DummyPort*>(port_handle);
|
||||
std::vector<DummyPort*>::iterator i = std::find (_ports.begin (), _ports.end (), static_cast<DummyPort*>(port_handle));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue