mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-20 21:56:30 +01:00
for backends w/o control, save a fake state with only the "active" attribute.
This makes ardour start directly with external jack without asking if jack was previously used. It also retains jackd settings if jackd was previously started by ardour.
This commit is contained in:
parent
71e3f4a72c
commit
8798f8d88a
2 changed files with 30 additions and 20 deletions
|
|
@ -1053,8 +1053,8 @@ EngineControl::get_matching_state (
|
||||||
{
|
{
|
||||||
for (StateList::iterator i = states.begin(); i != states.end(); ++i) {
|
for (StateList::iterator i = states.begin(); i != states.end(); ++i) {
|
||||||
if ((*i)->backend == backend &&
|
if ((*i)->backend == backend &&
|
||||||
(*i)->driver == driver &&
|
(!_have_control || ((*i)->driver == driver && (*i)->device == device)))
|
||||||
(*i)->device == device) {
|
{
|
||||||
return (*i);
|
return (*i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1081,11 +1081,19 @@ EngineControl::get_saved_state_for_currently_displayed_backend_and_device ()
|
||||||
EngineControl::State
|
EngineControl::State
|
||||||
EngineControl::save_state ()
|
EngineControl::save_state ()
|
||||||
{
|
{
|
||||||
|
State state;
|
||||||
|
|
||||||
if (!_have_control) {
|
if (!_have_control) {
|
||||||
return State();
|
state = get_matching_state (backend_combo.get_active_text(), string(), string());
|
||||||
|
if (state) {
|
||||||
|
return state;
|
||||||
}
|
}
|
||||||
State state (new StateStruct);
|
state.reset(new StateStruct);
|
||||||
|
state->backend = get_backend ();
|
||||||
|
} else {
|
||||||
|
state.reset(new StateStruct);
|
||||||
store_state (state);
|
store_state (state);
|
||||||
|
}
|
||||||
|
|
||||||
for (StateList::iterator i = states.begin(); i != states.end();) {
|
for (StateList::iterator i = states.begin(); i != states.end();) {
|
||||||
if ((*i)->backend == state->backend &&
|
if ((*i)->backend == state->backend &&
|
||||||
|
|
@ -1604,7 +1612,6 @@ EngineControl::post_push ()
|
||||||
* necessary
|
* necessary
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (_have_control) {
|
|
||||||
State state = get_saved_state_for_currently_displayed_backend_and_device ();
|
State state = get_saved_state_for_currently_displayed_backend_and_device ();
|
||||||
|
|
||||||
if (!state) {
|
if (!state) {
|
||||||
|
|
@ -1624,6 +1631,7 @@ EngineControl::post_push ()
|
||||||
|
|
||||||
state->active = true;
|
state->active = true;
|
||||||
|
|
||||||
|
if (_have_control) { // XXX
|
||||||
manage_control_app_sensitivity ();
|
manage_control_app_sensitivity ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,9 @@ class EngineControl : public ArdourDialog, public PBD::ScopedConnectionList {
|
||||||
std::vector<MidiDeviceSettings> midi_devices;
|
std::vector<MidiDeviceSettings> midi_devices;
|
||||||
|
|
||||||
StateStruct()
|
StateStruct()
|
||||||
: input_latency (0)
|
: sample_rate (48000)
|
||||||
|
, buffer_size (1024)
|
||||||
|
, input_latency (0)
|
||||||
, output_latency (0)
|
, output_latency (0)
|
||||||
, input_channels (0)
|
, input_channels (0)
|
||||||
, output_channels (0)
|
, output_channels (0)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue