diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2020-04-07 17:42:48 -0600 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2020-04-07 18:15:51 -0600 |
commit | 893e835dcae91d6521f23c82cb7edf70575e407e (patch) | |
tree | aff5753f659a48bd4dbed7f3e6c504ebf0265f13 /libs/surfaces | |
parent | 8562582da252fae3b72f4f348e1baf90d4d90cb8 (diff) |
NOOP: whitespace
Diffstat (limited to 'libs/surfaces')
-rw-r--r-- | libs/surfaces/mackie/mackie_control_protocol.cc | 6 | ||||
-rw-r--r-- | libs/surfaces/mackie/mackie_control_protocol.h | 2 | ||||
-rw-r--r-- | libs/surfaces/mackie/subview.cc | 206 | ||||
-rw-r--r-- | libs/surfaces/mackie/subview.h | 68 |
4 files changed, 141 insertions, 141 deletions
diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index 7e8fbdb7e4..fb522466d8 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -141,7 +141,7 @@ MackieControlProtocol::MackieControlProtocol (Session& session) , nudge_modifier_consumed_by_button (false) { DEBUG_TRACE (DEBUG::MackieControl, "MackieControlProtocol::MackieControlProtocol\n"); - + _subview = Mackie::SubviewFactory::instance()->create_subview(SubViewMode::None, *this, boost::shared_ptr<Stripable>()); DeviceInfo::reload_device_info (); @@ -1409,7 +1409,7 @@ MackieControlProtocol::notify_record_state_changed () ls = on; break; case Session::Enabled: - + if(_device_info.is_qcon()){ // For qcon the rec button is two state only (on/off) DEBUG_TRACE (DEBUG::MackieControl, "record state changed to enabled, LED on (QCon)\n"); @@ -1758,7 +1758,7 @@ MackieControlProtocol::set_subview_mode (SubViewMode sm, boost::shared_ptr<Strip return false; } - + _subview = Mackie::SubviewFactory::instance()->create_subview(sm, *this, r); /* Catch the current subview stripable going away */ if (_subview->subview_stripable()) { diff --git a/libs/surfaces/mackie/mackie_control_protocol.h b/libs/surfaces/mackie/mackie_control_protocol.h index c80820d07b..0487e11753 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.h +++ b/libs/surfaces/mackie/mackie_control_protocol.h @@ -359,7 +359,7 @@ class MackieControlProtocol void initialize (); int set_device_info (const std::string& device_name); void update_configuration_state (); - + /* MIDI port connection management */ PBD::ScopedConnection port_connection; diff --git a/libs/surfaces/mackie/subview.cc b/libs/surfaces/mackie/subview.cc index 9721624f9b..6f88d5a962 100644 --- a/libs/surfaces/mackie/subview.cc +++ b/libs/surfaces/mackie/subview.cc @@ -21,8 +21,8 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ - - + + #include "pbd/convert.h" #include "pbd/failed_constructor.h" @@ -42,12 +42,12 @@ #include "subview.h" #include "subview_modes.h" #include "surface.h" - + using namespace ARDOUR; using namespace ArdourSurface; using namespace Mackie; using namespace PBD; - + #define ui_context() MackieControlProtocol::instance() /* a UICallback-derived object that specifies the event loop for signal handling */ SubviewFactory* SubviewFactory::_instance = 0; @@ -62,9 +62,9 @@ SubviewFactory* SubviewFactory::instance() { SubviewFactory::SubviewFactory() {}; boost::shared_ptr<Subview> SubviewFactory::create_subview( - SubViewMode svm, - MackieControlProtocol& mcp, - boost::shared_ptr<ARDOUR::Stripable> subview_stripable) + SubViewMode svm, + MackieControlProtocol& mcp, + boost::shared_ptr<ARDOUR::Stripable> subview_stripable) { switch (svm) { case SubViewMode::EQ: @@ -91,7 +91,7 @@ Subview::Subview(MackieControlProtocol& mcp, boost::shared_ptr<ARDOUR::Stripable init_strip_vectors(); } -Subview::~Subview() +Subview::~Subview() { reset_all_vpot_controls(); } @@ -114,7 +114,7 @@ Subview::reset_all_vpot_controls() } } -void Subview::handle_vselect_event(uint32_t global_strip_position) +void Subview::handle_vselect_event(uint32_t global_strip_position) { Strip* strip = 0; Pot* vpot = 0; @@ -188,7 +188,7 @@ Subview::init_strip_vectors() } void -Subview::store_pointers(Strip* strip, Pot* vpot, std::string* pending_display, uint32_t global_strip_position) +Subview::store_pointers(Strip* strip, Pot* vpot, std::string* pending_display, uint32_t global_strip_position) { if (global_strip_position >= _strips_over_all_surfaces.size() || global_strip_position >= _strip_vpots_over_all_surfaces.size() || @@ -196,7 +196,7 @@ Subview::store_pointers(Strip* strip, Pot* vpot, std::string* pending_display, u { return; } - + _strips_over_all_surfaces[global_strip_position] = strip; _strip_vpots_over_all_surfaces[global_strip_position] = vpot; _strip_pending_displays_over_all_surfaces[global_strip_position] = pending_display; @@ -207,11 +207,11 @@ Subview::retrieve_pointers(Strip** strip, Pot** vpot, std::string** pending_disp { if (global_strip_position >= _strips_over_all_surfaces.size() || global_strip_position >= _strip_vpots_over_all_surfaces.size() || - global_strip_position >= _strip_pending_displays_over_all_surfaces.size()) + global_strip_position >= _strip_pending_displays_over_all_surfaces.size()) { return false; } - + *strip = _strips_over_all_surfaces[global_strip_position]; *vpot = _strip_vpots_over_all_surfaces[global_strip_position]; *pending_display = _strip_pending_displays_over_all_surfaces[global_strip_position]; @@ -227,9 +227,9 @@ Subview::retrieve_pointers(Strip** strip, Pot** vpot, std::string** pending_disp void Subview::do_parameter_display(std::string& display, const ParameterDescriptor& pd, float param_val, Strip* strip, bool screen_hold) { display = Strip::format_paramater_for_display( - pd, - param_val, - strip->stripable(), + pd, + param_val, + strip->stripable(), screen_hold ); @@ -243,20 +243,20 @@ void Subview::do_parameter_display(std::string& display, const ParameterDescript -NoneSubview::NoneSubview(MackieControlProtocol& mcp, boost::shared_ptr<ARDOUR::Stripable> subview_stripable) +NoneSubview::NoneSubview(MackieControlProtocol& mcp, boost::shared_ptr<ARDOUR::Stripable> subview_stripable) : Subview(mcp, subview_stripable) {} -NoneSubview::~NoneSubview() +NoneSubview::~NoneSubview() {} -bool NoneSubview::subview_mode_would_be_ok (boost::shared_ptr<ARDOUR::Stripable> r, std::string& reason_why_not) +bool NoneSubview::subview_mode_would_be_ok (boost::shared_ptr<ARDOUR::Stripable> r, std::string& reason_why_not) { // always possible return true; } -void NoneSubview::update_global_buttons() +void NoneSubview::update_global_buttons() { _mcp.update_global_button (Button::Send, off); _mcp.update_global_button (Button::Plugin, off); @@ -268,7 +268,7 @@ void NoneSubview::update_global_buttons() void NoneSubview::setup_vpot( Strip* strip, - Pot* vpot, + Pot* vpot, std::string pending_display[2]) { // nothing to be done here. All pots are set in strip.cc @@ -276,24 +276,24 @@ void NoneSubview::setup_vpot( -EQSubview::EQSubview(MackieControlProtocol& mcp, boost::shared_ptr<ARDOUR::Stripable> subview_stripable) +EQSubview::EQSubview(MackieControlProtocol& mcp, boost::shared_ptr<ARDOUR::Stripable> subview_stripable) : Subview(mcp, subview_stripable) {} -EQSubview::~EQSubview() +EQSubview::~EQSubview() {} -bool EQSubview::subview_mode_would_be_ok (boost::shared_ptr<ARDOUR::Stripable> r, std::string& reason_why_not) +bool EQSubview::subview_mode_would_be_ok (boost::shared_ptr<ARDOUR::Stripable> r, std::string& reason_why_not) { if (r && r->eq_band_cnt() > 0) { return true; - } - + } + reason_why_not = "no EQ in the track/bus"; return false; } -void EQSubview::update_global_buttons() +void EQSubview::update_global_buttons() { _mcp.update_global_button (Button::Send, off); _mcp.update_global_button (Button::Plugin, off); @@ -305,17 +305,17 @@ void EQSubview::update_global_buttons() void EQSubview::setup_vpot( Strip* strip, - Pot* vpot, + Pot* vpot, std::string pending_display[2]) { const uint32_t global_strip_position = _mcp.global_index (*strip); store_pointers(strip, vpot, pending_display, global_strip_position); - + if (!_subview_stripable) { return; } - - + + boost::shared_ptr<AutomationControl> pc; std::string pot_id; @@ -344,7 +344,7 @@ void EQSubview::setup_vpot( band_name = _subview_stripable->eq_band_name (eq_band); pot_id = band_name + "Gain"; break; - case 8: + case 8: pc = _subview_stripable->eq_shape_controllable(0); //low band "bell" button band_name = "lo"; pot_id = band_name + " Shp"; @@ -415,22 +415,22 @@ void EQSubview::setup_vpot( } else { pending_display[0] = std::string(); } - + } else { //no controllable was found; just clear this knob vpot->set_control (boost::shared_ptr<AutomationControl>()); pending_display[0] = std::string(); pending_display[1] = std::string(); } - + notify_change (boost::weak_ptr<AutomationControl>(pc), global_strip_position, true); } -void EQSubview::notify_change (boost::weak_ptr<ARDOUR::AutomationControl> pc, uint32_t global_strip_position, bool force) +void EQSubview::notify_change (boost::weak_ptr<ARDOUR::AutomationControl> pc, uint32_t global_strip_position, bool force) { if (!_subview_stripable) { return; } - + Strip* strip = 0; Pot* vpot = 0; std::string* pending_display = 0; @@ -450,24 +450,24 @@ void EQSubview::notify_change (boost::weak_ptr<ARDOUR::AutomationControl> pc, ui -DynamicsSubview::DynamicsSubview(MackieControlProtocol& mcp, boost::shared_ptr<ARDOUR::Stripable> subview_stripable) +DynamicsSubview::DynamicsSubview(MackieControlProtocol& mcp, boost::shared_ptr<ARDOUR::Stripable> subview_stripable) : Subview(mcp, subview_stripable) {} -DynamicsSubview::~DynamicsSubview() +DynamicsSubview::~DynamicsSubview() {} -bool DynamicsSubview::subview_mode_would_be_ok (boost::shared_ptr<ARDOUR::Stripable> r, std::string& reason_why_not) +bool DynamicsSubview::subview_mode_would_be_ok (boost::shared_ptr<ARDOUR::Stripable> r, std::string& reason_why_not) { if (r && r->comp_enable_controllable()) { return true; } - + reason_why_not = "no dynamics in selected track/bus"; return false; } -void DynamicsSubview::update_global_buttons() +void DynamicsSubview::update_global_buttons() { _mcp.update_global_button (Button::Send, off); _mcp.update_global_button (Button::Plugin, off); @@ -479,16 +479,16 @@ void DynamicsSubview::update_global_buttons() void DynamicsSubview::setup_vpot( Strip* strip, - Pot* vpot, + Pot* vpot, std::string pending_display[2]) { const uint32_t global_strip_position = _mcp.global_index (*strip); store_pointers(strip, vpot, pending_display, global_strip_position); - + if (!_subview_stripable) { return; } - + boost::shared_ptr<AutomationControl> tc = _subview_stripable->comp_threshold_controllable (); boost::shared_ptr<AutomationControl> sc = _subview_stripable->comp_speed_controllable (); boost::shared_ptr<AutomationControl> mc = _subview_stripable->comp_mode_controllable (); @@ -546,13 +546,13 @@ void DynamicsSubview::setup_vpot( } void -DynamicsSubview::notify_change (boost::weak_ptr<ARDOUR::AutomationControl> pc, uint32_t global_strip_position, bool force, bool propagate_mode) +DynamicsSubview::notify_change (boost::weak_ptr<ARDOUR::AutomationControl> pc, uint32_t global_strip_position, bool force, bool propagate_mode) { - if (!_subview_stripable) + if (!_subview_stripable) { return; } - + Strip* strip = 0; Pot* vpot = 0; std::string* pending_display = 0; @@ -583,24 +583,24 @@ DynamicsSubview::notify_change (boost::weak_ptr<ARDOUR::AutomationControl> pc, u -SendsSubview::SendsSubview(MackieControlProtocol& mcp, boost::shared_ptr<ARDOUR::Stripable> subview_stripable) +SendsSubview::SendsSubview(MackieControlProtocol& mcp, boost::shared_ptr<ARDOUR::Stripable> subview_stripable) : Subview(mcp, subview_stripable) {} -SendsSubview::~SendsSubview() +SendsSubview::~SendsSubview() {} -bool SendsSubview::subview_mode_would_be_ok (boost::shared_ptr<ARDOUR::Stripable> r, std::string& reason_why_not) +bool SendsSubview::subview_mode_would_be_ok (boost::shared_ptr<ARDOUR::Stripable> r, std::string& reason_why_not) { if (r && r->send_level_controllable (0)) { return true; } - + reason_why_not = "no sends for selected track/bus"; return false; } -void SendsSubview::update_global_buttons() +void SendsSubview::update_global_buttons() { _mcp.update_global_button (Button::Send, on); _mcp.update_global_button (Button::Plugin, off); @@ -612,12 +612,12 @@ void SendsSubview::update_global_buttons() void SendsSubview::setup_vpot( Strip* strip, - Pot* vpot, + Pot* vpot, std::string pending_display[2]) { const uint32_t global_strip_position = _mcp.global_index (*strip); store_pointers(strip, vpot, pending_display, global_strip_position); - + if (!_subview_stripable) { return; } @@ -646,7 +646,7 @@ SendsSubview::notify_send_level_change (uint32_t global_strip_position, bool for if (!_subview_stripable) { return; } - + Strip* strip = 0; Pot* vpot = 0; std::string* pending_display = 0; @@ -720,24 +720,24 @@ void SendsSubview::handle_vselect_event(uint32_t global_strip_position) -TrackViewSubview::TrackViewSubview(MackieControlProtocol& mcp, boost::shared_ptr<ARDOUR::Stripable> subview_stripable) +TrackViewSubview::TrackViewSubview(MackieControlProtocol& mcp, boost::shared_ptr<ARDOUR::Stripable> subview_stripable) : Subview(mcp, subview_stripable) {} -TrackViewSubview::~TrackViewSubview() +TrackViewSubview::~TrackViewSubview() {} -bool TrackViewSubview::subview_mode_would_be_ok (boost::shared_ptr<ARDOUR::Stripable> r, std::string& reason_why_not) +bool TrackViewSubview::subview_mode_would_be_ok (boost::shared_ptr<ARDOUR::Stripable> r, std::string& reason_why_not) { if (r) { return true; } - + reason_why_not = "no track view possible"; return false; } -void TrackViewSubview::update_global_buttons() +void TrackViewSubview::update_global_buttons() { _mcp.update_global_button (Button::Send, off); _mcp.update_global_button (Button::Plugin, off); @@ -748,13 +748,13 @@ void TrackViewSubview::update_global_buttons() } void TrackViewSubview::setup_vpot( - Strip* strip, - Pot* vpot, + Strip* strip, + Pot* vpot, std::string pending_display[2]) { const uint32_t global_strip_position = _mcp.global_index (*strip); store_pointers(strip, vpot, pending_display, global_strip_position); - + if (global_strip_position > 4) { /* nothing to control */ vpot->set_control (boost::shared_ptr<AutomationControl>()); @@ -762,7 +762,7 @@ void TrackViewSubview::setup_vpot( pending_display[1] = std::string(); return; } - + if (!_subview_stripable) { return; } @@ -814,7 +814,7 @@ void TrackViewSubview::setup_vpot( } break; } - + if (!pc) { pending_display[0] = std::string(); pending_display[1] = std::string(); @@ -830,7 +830,7 @@ TrackViewSubview::notify_change (AutomationType type, uint32_t global_strip_posi if (!_subview_stripable) { return; } - + Strip* strip = 0; Pot* vpot = 0; std::string* pending_display = 0; @@ -869,9 +869,9 @@ TrackViewSubview::notify_change (AutomationType type, uint32_t global_strip_posi } if (control) { - float val = control->get_value(); + float val = control->get_value(); do_parameter_display(pending_display[1], control->desc(), val, strip, screen_hold); - + /* update pot/encoder */ strip->surface()->write (vpot->set (control->internal_to_interface (val), true, Pot::wrap)); } @@ -879,14 +879,14 @@ TrackViewSubview::notify_change (AutomationType type, uint32_t global_strip_posi -PluginSubview::PluginSubview(MackieControlProtocol& mcp, boost::shared_ptr<ARDOUR::Stripable> subview_stripable) +PluginSubview::PluginSubview(MackieControlProtocol& mcp, boost::shared_ptr<ARDOUR::Stripable> subview_stripable) : Subview(mcp, subview_stripable) { _plugin_subview_state = boost::make_shared<PluginSelect>(*this); connect_processors_changed_signal(); } -PluginSubview::~PluginSubview() +PluginSubview::~PluginSubview() {} void PluginSubview::connect_processors_changed_signal() @@ -894,7 +894,7 @@ void PluginSubview::connect_processors_changed_signal() boost::shared_ptr<Route> route = boost::dynamic_pointer_cast<Route> (_subview_stripable); if (route) { - route->processors_changed.connect(_subview_connections, MISSING_INVALIDATOR, boost::bind (&PluginSubview::handle_processors_changed, this), ui_context()); + route->processors_changed.connect(_subview_connections, MISSING_INVALIDATOR, boost::bind (&PluginSubview::handle_processors_changed, this), ui_context()); } } @@ -903,7 +903,7 @@ void PluginSubview::handle_processors_changed() _mcp.redisplay_subview_mode(); } -bool PluginSubview::subview_mode_would_be_ok (boost::shared_ptr<ARDOUR::Stripable> r, std::string& reason_why_not) +bool PluginSubview::subview_mode_would_be_ok (boost::shared_ptr<ARDOUR::Stripable> r, std::string& reason_why_not) { if (r) { boost::shared_ptr<Route> route = boost::dynamic_pointer_cast<Route> (r); @@ -911,12 +911,12 @@ bool PluginSubview::subview_mode_would_be_ok (boost::shared_ptr<ARDOUR::Stripabl return true; } } - + reason_why_not = "no plugins in selected track/bus"; return false; } -void PluginSubview::update_global_buttons() +void PluginSubview::update_global_buttons() { _mcp.update_global_button (Button::Send, off); _mcp.update_global_button (Button::Plugin, on); @@ -926,14 +926,14 @@ void PluginSubview::update_global_buttons() _mcp.update_global_button (Button::Pan, off); } -bool PluginSubview::permit_flipping_faders_and_pots() -{ - return _plugin_subview_state->permit_flipping_faders_and_pots(); +bool PluginSubview::permit_flipping_faders_and_pots() +{ + return _plugin_subview_state->permit_flipping_faders_and_pots(); } void PluginSubview::setup_vpot( Strip* strip, - Pot* vpot, + Pot* vpot, std::string pending_display[2]) { const uint32_t global_strip_position = _mcp.global_index (*strip); @@ -941,16 +941,16 @@ void PluginSubview::setup_vpot( _plugin_subview_state->setup_vpot(strip, vpot, pending_display, global_strip_position, _subview_stripable); } -void PluginSubview::handle_vselect_event(uint32_t global_strip_position) +void PluginSubview::handle_vselect_event(uint32_t global_strip_position) { _plugin_subview_state->handle_vselect_event(global_strip_position, _subview_stripable); } -bool PluginSubview::handle_cursor_right_press() +bool PluginSubview::handle_cursor_right_press() { return _plugin_subview_state->handle_cursor_right_press(); } - + bool PluginSubview::handle_cursor_left_press() { return _plugin_subview_state->handle_cursor_left_press(); @@ -988,22 +988,22 @@ PluginSubviewState::~PluginSubviewState() {} std::string -PluginSubviewState::shorten_display_text(const std::string& text, std::string::size_type target_length) +PluginSubviewState::shorten_display_text(const std::string& text, std::string::size_type target_length) { if (text.length() <= target_length) { return text; - } - + } + return PBD::short_version (text, target_length); } -bool PluginSubviewState::handle_cursor_right_press() +bool PluginSubviewState::handle_cursor_right_press() { _current_bank = _current_bank + 1; bank_changed(); return true; } - + bool PluginSubviewState::handle_cursor_left_press() { if (_current_bank >= 1) @@ -1030,7 +1030,7 @@ PluginSelect::~PluginSelect() void PluginSelect::setup_vpot( Strip* strip, - Pot* vpot, + Pot* vpot, std::string pending_display[2], uint32_t global_strip_position, boost::shared_ptr<ARDOUR::Stripable> subview_stripable) @@ -1038,16 +1038,16 @@ void PluginSelect::setup_vpot( if (!subview_stripable) { return; } - + boost::shared_ptr<Route> route = boost::dynamic_pointer_cast<Route> (subview_stripable); if (!route) { return; } uint32_t virtual_strip_position = calculate_virtual_strip_position(global_strip_position); - + boost::shared_ptr<Processor> plugin = route->nth_plugin(virtual_strip_position); - + if (plugin) { DEBUG_TRACE (DEBUG::MackieControl, string_compose ("plugin of strip %1 is %2\n", global_strip_position, plugin->display_name())); pending_display[0] = string_compose("Ins%1Pl", virtual_strip_position + 1); @@ -1066,14 +1066,14 @@ void PluginSelect::handle_vselect_event(uint32_t global_strip_position, if (!subview_stripable) { return; } - + boost::shared_ptr<Route> route = boost::dynamic_pointer_cast<Route> (subview_stripable); if (!route) { return; } uint32_t virtual_strip_position = calculate_virtual_strip_position(global_strip_position); - + boost::shared_ptr<Processor> processor = route->nth_plugin(virtual_strip_position); boost::shared_ptr<PluginInsert> plugin = boost::dynamic_pointer_cast<PluginInsert>(processor); processor->ShowUI(); @@ -1101,7 +1101,7 @@ PluginEdit::PluginEdit(PluginSubview& context, boost::weak_ptr<PluginInsert> wea } } -PluginEdit::~PluginEdit() +PluginEdit::~PluginEdit() {} void PluginEdit::init() @@ -1110,7 +1110,7 @@ void PluginEdit::init() _weak_subview_plugin = boost::weak_ptr<ARDOUR::Plugin>(plugin_insert->plugin()); boost::shared_ptr<ARDOUR::Plugin> subview_plugin = _weak_subview_plugin.lock(); _plugin_input_parameter_indices.clear(); - + if (!subview_plugin) { return; } @@ -1135,13 +1135,13 @@ boost::shared_ptr<AutomationControl> PluginEdit::parameter_control(uint32_t glob if (virtual_strip_position >= _plugin_input_parameter_indices.size()) { return boost::shared_ptr<AutomationControl>(); } - + boost::shared_ptr<PluginInsert> plugin_insert = _weak_subview_plugin_insert.lock(); boost::shared_ptr<ARDOUR::Plugin> subview_plugin = _weak_subview_plugin.lock(); if (!plugin_insert || !subview_plugin) { return boost::shared_ptr<AutomationControl>(); } - + uint32_t plugin_parameter_index = _plugin_input_parameter_indices[virtual_strip_position]; bool ok = false; uint32_t controlid = subview_plugin->nth_parameter(plugin_parameter_index, ok); @@ -1159,18 +1159,18 @@ bool PluginEdit::plugin_went_away() const if (!plugin_insert || !subview_plugin) { return true; } - + // is plugin not registered with stripable any more? boost::shared_ptr<Route> route = boost::dynamic_pointer_cast<Route> (_context.subview_stripable()); if (!route) { return true; } - + if (!route->processor_by_id(plugin_insert->id())) { // plugin_insert is not registered with route any more -> it was removed return true; } - + return false; } @@ -1181,7 +1181,7 @@ void PluginEdit::switch_to_plugin_select_state() void PluginEdit::setup_vpot( Strip* strip, - Pot* vpot, + Pot* vpot, std::string pending_display[2], uint32_t global_strip_position, boost::shared_ptr<ARDOUR::Stripable> subview_stripable) @@ -1190,7 +1190,7 @@ void PluginEdit::setup_vpot( switch_to_plugin_select_state(); return; } - + boost::shared_ptr<AutomationControl> c = parameter_control(global_strip_position); if (!c) { @@ -1207,7 +1207,7 @@ void PluginEdit::setup_vpot( } -void PluginEdit::notify_parameter_change(Strip* strip, Pot* vpot, std::string pending_display[2], uint32_t global_strip_position) +void PluginEdit::notify_parameter_change(Strip* strip, Pot* vpot, std::string pending_display[2], uint32_t global_strip_position) { boost::shared_ptr<AutomationControl> control = parameter_control(global_strip_position); if (!control) @@ -1217,7 +1217,7 @@ void PluginEdit::notify_parameter_change(Strip* strip, Pot* vpot, std::string pe float val = control->get_value(); _context.do_parameter_display(pending_display[1], control->desc(), val, strip, false); - + if (vpot->control() == control) { /* update pot/encoder */ strip->surface()->write(vpot->set (control->internal_to_interface (val), true, Pot::wrap)); diff --git a/libs/surfaces/mackie/subview.h b/libs/surfaces/mackie/subview.h index 1cce051842..5eee4cb550 100644 --- a/libs/surfaces/mackie/subview.h +++ b/libs/surfaces/mackie/subview.h @@ -40,8 +40,8 @@ class Surface; class SubviewFactory { public: static SubviewFactory* instance(); - - boost::shared_ptr<Subview> create_subview(SubViewMode svm, + + boost::shared_ptr<Subview> create_subview(SubViewMode svm, MackieControlProtocol& mcp, boost::shared_ptr<ARDOUR::Stripable> subview_stripable); protected: SubviewFactory(); @@ -57,40 +57,40 @@ class Subview { public: Subview(MackieControlProtocol& mcp, boost::shared_ptr<ARDOUR::Stripable> subview_stripable); virtual ~Subview(); - + virtual SubViewMode subview_mode () const = 0; virtual void update_global_buttons() = 0; virtual bool permit_flipping_faders_and_pots() { return false; } virtual void setup_vpot( - Strip* strip, - Pot* vpot, + Strip* strip, + Pot* vpot, std::string pending_display[2]) = 0; virtual void handle_vselect_event(uint32_t global_strip_position); // returns true if press was handled in the subview, default is false virtual bool handle_cursor_right_press() { return false; } // returns true if press was handled in the subview, default is false virtual bool handle_cursor_left_press() { return false; } - + static bool subview_mode_would_be_ok (SubViewMode, boost::shared_ptr<ARDOUR::Stripable>, std::string& reason_why_not); boost::shared_ptr<ARDOUR::Stripable> subview_stripable() const { return _subview_stripable; } - + void notify_subview_stripable_deleted (); MackieControlProtocol& mcp() { return _mcp; } - + PBD::ScopedConnectionList& subview_stripable_connections() { return _subview_stripable_connections; } PBD::ScopedConnectionList& subview_connections() { return _subview_connections; } - + void do_parameter_display(std::string& display, const ARDOUR::ParameterDescriptor& pd, float param_val, Strip* strip, bool screen_hold); - + protected: void init_strip_vectors(); void store_pointers(Strip* strip, Pot* vpot, std::string* pending_display, uint32_t global_strip_position); bool retrieve_pointers(Strip** strip, Pot** vpot, std::string** pending_display, uint32_t global_strip_position); - + MackieControlProtocol& _mcp; boost::shared_ptr<ARDOUR::Stripable> _subview_stripable; PBD::ScopedConnectionList _subview_stripable_connections; - + std::vector<Strip*> _strips_over_all_surfaces; std::vector<Pot*> _strip_vpots_over_all_surfaces; std::vector<std::string*> _strip_pending_displays_over_all_surfaces; @@ -103,14 +103,14 @@ class NoneSubview : public Subview { public: NoneSubview(MackieControlProtocol& mcp, boost::shared_ptr<ARDOUR::Stripable> subview_stripable); virtual ~NoneSubview(); - + virtual SubViewMode subview_mode () const { return SubViewMode::None; } static bool subview_mode_would_be_ok (boost::shared_ptr<ARDOUR::Stripable> r, std::string& reason_why_not); - + virtual void update_global_buttons(); - virtual void setup_vpot( + virtual void setup_vpot( Strip* strip, - Pot* vpot, + Pot* vpot, std::string pending_display[2]); }; @@ -118,13 +118,13 @@ class EQSubview : public Subview { public: EQSubview(MackieControlProtocol& mcp, boost::shared_ptr<ARDOUR::Stripable> subview_stripable); virtual ~EQSubview(); - + virtual SubViewMode subview_mode () const { return SubViewMode::EQ; } static bool subview_mode_would_be_ok (boost::shared_ptr<ARDOUR::Stripable> r, std::string& reason_why_not); virtual void update_global_buttons(); virtual void setup_vpot( Strip* strip, - Pot* vpot, + Pot* vpot, std::string pending_display[2]); void notify_change (boost::weak_ptr<ARDOUR::AutomationControl>, uint32_t global_strip_position, bool force); }; @@ -133,13 +133,13 @@ class DynamicsSubview : public Subview { public: DynamicsSubview(MackieControlProtocol& mcp, boost::shared_ptr<ARDOUR::Stripable> subview_stripable); virtual ~DynamicsSubview(); - + virtual SubViewMode subview_mode () const { return SubViewMode::Dynamics; } static bool subview_mode_would_be_ok (boost::shared_ptr<ARDOUR::Stripable> r, std::string& reason_why_not); virtual void update_global_buttons(); virtual void setup_vpot( Strip* strip, - Pot* vpot, + Pot* vpot, std::string pending_display[2]); void notify_change (boost::weak_ptr<ARDOUR::AutomationControl>, uint32_t global_strip_position, bool force, bool propagate_mode_change); }; @@ -148,14 +148,14 @@ class SendsSubview : public Subview { public: SendsSubview(MackieControlProtocol& mcp, boost::shared_ptr<ARDOUR::Stripable> subview_stripable); virtual ~SendsSubview(); - + virtual SubViewMode subview_mode () const { return SubViewMode::Sends; } static bool subview_mode_would_be_ok (boost::shared_ptr<ARDOUR::Stripable> r, std::string& reason_why_not); virtual void update_global_buttons(); virtual bool permit_flipping_faders_and_pots() { return true; } virtual void setup_vpot( Strip* strip, - Pot* vpot, + Pot* vpot, std::string pending_display[2]); void notify_send_level_change (uint32_t global_strip_position, bool force); @@ -166,13 +166,13 @@ class TrackViewSubview : public Subview { public: TrackViewSubview(MackieControlProtocol& mcp, boost::shared_ptr<ARDOUR::Stripable> subview_stripable); virtual ~TrackViewSubview(); - + virtual SubViewMode subview_mode () const { return SubViewMode::TrackView; } static bool subview_mode_would_be_ok (boost::shared_ptr<ARDOUR::Stripable> r, std::string& reason_why_not); virtual void update_global_buttons(); virtual void setup_vpot( Strip* strip, - Pot* vpot, + Pot* vpot, std::string pending_display[2]); void notify_change (ARDOUR::AutomationType, uint32_t global_strip_position, bool force); }; @@ -190,7 +190,7 @@ class PluginSubview : public Subview { virtual bool permit_flipping_faders_and_pots(); virtual void setup_vpot( Strip* strip, - Pot* vpot, + Pot* vpot, std::string pending_display[2]); virtual void handle_vselect_event(uint32_t global_strip_position); virtual bool handle_cursor_right_press(); @@ -201,7 +201,7 @@ class PluginSubview : public Subview { protected: void connect_processors_changed_signal(); void handle_processors_changed(); - + boost::shared_ptr<PluginSubviewState> _plugin_subview_state; }; @@ -209,11 +209,11 @@ class PluginSubviewState { public: PluginSubviewState(PluginSubview& context); virtual ~PluginSubviewState(); - + virtual bool permit_flipping_faders_and_pots() { return false; } virtual void setup_vpot( Strip* strip, - Pot* vpot, + Pot* vpot, std::string pending_display[2], uint32_t global_strip_position, boost::shared_ptr<ARDOUR::Stripable> subview_stripable) = 0; @@ -235,10 +235,10 @@ class PluginSelect : public PluginSubviewState { public: PluginSelect(PluginSubview& context); virtual ~PluginSelect(); - + virtual void setup_vpot( Strip* strip, - Pot* vpot, + Pot* vpot, std::string pending_display[2], uint32_t global_strip_position, boost::shared_ptr<ARDOUR::Stripable> subview_stripable); @@ -250,22 +250,22 @@ class PluginEdit : public PluginSubviewState { public: PluginEdit(PluginSubview& context, boost::weak_ptr<ARDOUR::PluginInsert> weak_subview_plugin); virtual ~PluginEdit(); - + virtual bool permit_flipping_faders_and_pots() { return true; } virtual void setup_vpot( Strip* strip, - Pot* vpot, + Pot* vpot, std::string pending_display[2], uint32_t global_strip_position, boost::shared_ptr<ARDOUR::Stripable> subview_stripable); virtual void handle_vselect_event(uint32_t global_strip_position, boost::shared_ptr<ARDOUR::Stripable> subview_stripable); virtual void bank_changed(); - + void notify_parameter_change(Strip* strip, Pot* vpot, std::string pending_display[2], uint32_t global_strip_position); void init(); bool plugin_went_away() const; void switch_to_plugin_select_state(); - + boost::shared_ptr<ARDOUR::AutomationControl> parameter_control(uint32_t global_strip_position) const; boost::weak_ptr<ARDOUR::PluginInsert> _weak_subview_plugin_insert; |