From 3fe5a59c80c448672f7705e43bf644b91ca3676e Mon Sep 17 00:00:00 2001 From: Grygorii Zharun Date: Wed, 21 May 2014 04:04:59 -0500 Subject: [PATCH] [Summary] Fixed issue with unidentifiable ports [Details] This is a workaround applied as hotfix. As Sensei Valeriy said: "Don not use displayed data to identify entities". [git-p4: depot-paths = "//Abdaw/dev_main/tracks/": change = 462193] --- gtk2_ardour/tracks_control_panel.logic.cc | 24 +++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/gtk2_ardour/tracks_control_panel.logic.cc b/gtk2_ardour/tracks_control_panel.logic.cc index 24e1b4dfaa..a65814ff1b 100644 --- a/gtk2_ardour/tracks_control_panel.logic.cc +++ b/gtk2_ardour/tracks_control_panel.logic.cc @@ -629,13 +629,19 @@ TracksControlPanel::on_apply (WavesButton*) void TracksControlPanel::on_capture_active_changed(DeviceConnectionControl* capture_control, bool active) { - EngineStateController::instance()->set_physical_audio_input_state(capture_control->get_name(), active); + // GZ FIXME: remove this ugly workaround with prefix + std::string prefix("system:"); + std::string port_name(prefix + capture_control->get_name() ); + EngineStateController::instance()->set_physical_audio_input_state(port_name, active); } void TracksControlPanel::on_playback_active_changed(DeviceConnectionControl* playback_control, bool active) { - EngineStateController::instance()->set_physical_audio_output_state(playback_control->get_name(), active); + // GZ FIXME: remove this ugly workaround with prefix + std::string prefix("system:"); + std::string port_name(prefix + playback_control->get_name() ); + EngineStateController::instance()->set_physical_audio_output_state(port_name, active); } @@ -701,7 +707,12 @@ TracksControlPanel::on_input_configuration_changed () DeviceConnectionControl* control = dynamic_cast (*control_iter); if (control) { - bool new_state = EngineStateController::instance()->get_physical_audio_input_state(control->get_name() ); + + // GZ FIXME: remove this ugly workaround with prefix + std::string prefix("system:"); + std::string port_name(prefix + control->get_name() ); + + bool new_state = EngineStateController::instance()->get_physical_audio_input_state(port_name ); uint16_t number = DeviceConnectionControl::NoNumber; std::string track_name = ""; @@ -737,7 +748,12 @@ TracksControlPanel::on_output_configuration_changed() DeviceConnectionControl* control = dynamic_cast (*control_iter); if (control) { - bool new_state = EngineStateController::instance()->get_physical_audio_output_state(control->get_name() ); + + // GZ FIXME: remove this ugly workaround with prefix + std::string prefix("system:"); + std::string port_name(prefix + control->get_name() ); + + bool new_state = EngineStateController::instance()->get_physical_audio_output_state(port_name ); uint16_t number = DeviceConnectionControl::NoNumber;