mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +01:00
engine dialog, update device is changed.
This commit is contained in:
parent
82e23ecd2a
commit
dd6ee69ef8
2 changed files with 14 additions and 1 deletions
|
|
@ -93,6 +93,7 @@ EngineControl::EngineControl ()
|
||||||
, ignore_changes (0)
|
, ignore_changes (0)
|
||||||
, _desired_sample_rate (0)
|
, _desired_sample_rate (0)
|
||||||
, started_at_least_once (false)
|
, started_at_least_once (false)
|
||||||
|
, queue_device_changed (false)
|
||||||
{
|
{
|
||||||
using namespace Notebook_Helpers;
|
using namespace Notebook_Helpers;
|
||||||
vector<string> backend_names;
|
vector<string> backend_names;
|
||||||
|
|
@ -920,6 +921,15 @@ EngineControl::device_changed ()
|
||||||
string device_name = device_combo.get_active_text ();
|
string device_name = device_combo.get_active_text ();
|
||||||
vector<string> s;
|
vector<string> s;
|
||||||
|
|
||||||
|
if (device_name != backend->device_name()) {
|
||||||
|
/* we set the backend-device to query various device related intormation.
|
||||||
|
* This has the side effect that backend->device_name() will match
|
||||||
|
* the device_name and 'change_device' will never be true.
|
||||||
|
* so work around this by setting...
|
||||||
|
*/
|
||||||
|
queue_device_changed = true;
|
||||||
|
}
|
||||||
|
|
||||||
//the device name must be set FIRST so ASIO can populate buffersizes and the control panel button
|
//the device name must be set FIRST so ASIO can populate buffersizes and the control panel button
|
||||||
backend->set_device_name(device_name);
|
backend->set_device_name(device_name);
|
||||||
|
|
||||||
|
|
@ -1502,7 +1512,7 @@ EngineControl::push_state_to_backend (bool start)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (get_device_name() != backend->device_name()) {
|
if (queue_device_changed || get_device_name() != backend->device_name()) {
|
||||||
change_device = true;
|
change_device = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1571,6 +1581,8 @@ EngineControl::push_state_to_backend (bool start)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
queue_device_changed = false;
|
||||||
|
|
||||||
if (!_have_control) {
|
if (!_have_control) {
|
||||||
|
|
||||||
/* We do not have control over the backend, so the best we can
|
/* We do not have control over the backend, so the best we can
|
||||||
|
|
|
||||||
|
|
@ -119,6 +119,7 @@ class EngineControl : public ArdourDialog, public PBD::ScopedConnectionList {
|
||||||
uint32_t ignore_changes;
|
uint32_t ignore_changes;
|
||||||
uint32_t _desired_sample_rate;
|
uint32_t _desired_sample_rate;
|
||||||
bool started_at_least_once;
|
bool started_at_least_once;
|
||||||
|
bool queue_device_changed;
|
||||||
|
|
||||||
void driver_changed ();
|
void driver_changed ();
|
||||||
void backend_changed ();
|
void backend_changed ();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue