mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 08:36:32 +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
|
|
@ -914,8 +914,8 @@ AlsaAudioBackend::add_port (
|
||||||
void
|
void
|
||||||
AlsaAudioBackend::unregister_port (PortEngine::PortHandle port_handle)
|
AlsaAudioBackend::unregister_port (PortEngine::PortHandle port_handle)
|
||||||
{
|
{
|
||||||
if (!valid_port (port_handle)) {
|
if (!_run) {
|
||||||
PBD::error << _("AlsaBackend::unregister_port: Invalid Port.") << endmsg;
|
return;
|
||||||
}
|
}
|
||||||
AlsaPort* port = static_cast<AlsaPort*>(port_handle);
|
AlsaPort* port = static_cast<AlsaPort*>(port_handle);
|
||||||
std::vector<AlsaPort*>::iterator i = std::find (_ports.begin (), _ports.end (), static_cast<AlsaPort*>(port_handle));
|
std::vector<AlsaPort*>::iterator i = std::find (_ports.begin (), _ports.end (), static_cast<AlsaPort*>(port_handle));
|
||||||
|
|
|
||||||
|
|
@ -595,6 +595,9 @@ DummyAudioBackend::register_port (
|
||||||
{
|
{
|
||||||
if (name.size () == 0) { return 0; }
|
if (name.size () == 0) { return 0; }
|
||||||
if (flags & IsPhysical) { 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);
|
return add_port (_instance_name + ":" + name, type, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -631,8 +634,10 @@ DummyAudioBackend::add_port (
|
||||||
void
|
void
|
||||||
DummyAudioBackend::unregister_port (PortEngine::PortHandle port_handle)
|
DummyAudioBackend::unregister_port (PortEngine::PortHandle port_handle)
|
||||||
{
|
{
|
||||||
if (!valid_port (port_handle)) {
|
if (!_running) {
|
||||||
PBD::error << _("DummyBackend::unregister_port: Invalid Port.") << endmsg;
|
PBD::info << _("DummyBackend::unregister_port: Engine is not running.") << endmsg;
|
||||||
|
assert (!valid_port (port_handle));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
DummyPort* port = static_cast<DummyPort*>(port_handle);
|
DummyPort* port = static_cast<DummyPort*>(port_handle);
|
||||||
std::vector<DummyPort*>::iterator i = std::find (_ports.begin (), _ports.end (), 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