remove old mcp config params, use new one
git-svn-id: svn://localhost/ardour2/branches/3.0@11948 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
5ee1aaf8d0
commit
b4235221ab
@ -50,8 +50,7 @@ CONFIG_VARIABLE (bool, first_midi_bank_is_zero, "diplay-first-midi-bank-as-zero"
|
||||
|
||||
CONFIG_VARIABLE (uint32_t, feedback_interval_ms, "feedback-interval-ms", 100)
|
||||
CONFIG_VARIABLE (bool, use_tranzport, "use-tranzport", false)
|
||||
CONFIG_VARIABLE (std::string, mackie_emulation, "mackie-emulation", "mcu")
|
||||
CONFIG_VARIABLE (uint32_t, mackie_extenders, "mackie-extenders", 0)
|
||||
CONFIG_VARIABLE (std::string, mackie_device_name, "mackie-device-name", "Mackie Control Universal Pro")
|
||||
CONFIG_VARIABLE (RemoteModel, remote_model, "remote-model", MixerOrdered)
|
||||
|
||||
/* disk operations */
|
||||
|
@ -47,6 +47,7 @@ DeviceInfo::DeviceInfo()
|
||||
, _has_timecode_display (true)
|
||||
, _has_global_controls (true)
|
||||
, _has_jog_wheel (true)
|
||||
, _has_touch_sense_faders (true)
|
||||
, _name (X_("Mackie Control Universal Pro"))
|
||||
{
|
||||
|
||||
@ -128,6 +129,12 @@ DeviceInfo::set_state (const XMLNode& node, int /* version */)
|
||||
}
|
||||
}
|
||||
|
||||
if ((child = node.child ("TouchSenseFaders")) != 0) {
|
||||
if ((prop = child->property ("value")) != 0) {
|
||||
_has_touch_sense_faders = string_is_affirmative (prop->value());
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -185,6 +192,12 @@ DeviceInfo::has_jog_wheel () const
|
||||
return _has_jog_wheel;
|
||||
}
|
||||
|
||||
bool
|
||||
DeviceInfo::has_touch_sense_faders () const
|
||||
{
|
||||
return _has_touch_sense_faders;
|
||||
}
|
||||
|
||||
static const char * const devinfo_env_variable_name = "ARDOUR_MCP_DEVINFO_PATH";
|
||||
static const char* const devinfo_dir_name = "mcp_devices";
|
||||
static const char* const devinfo_suffix = ".xml";
|
||||
|
@ -45,6 +45,7 @@ class DeviceInfo
|
||||
bool has_timecode_display() const;
|
||||
bool has_global_controls() const;
|
||||
bool has_jog_wheel () const;
|
||||
bool has_touch_sense_faders() const;
|
||||
const std::string& name() const;
|
||||
|
||||
static std::map<std::string,DeviceInfo> device_info;
|
||||
@ -59,6 +60,7 @@ class DeviceInfo
|
||||
bool _has_timecode_display;
|
||||
bool _has_global_controls;
|
||||
bool _has_jog_wheel;
|
||||
bool _has_touch_sense_faders;
|
||||
std::string _name;
|
||||
};
|
||||
|
||||
|
@ -105,6 +105,7 @@ MackieControlProtocol::MackieControlProtocol (Session& session)
|
||||
DEBUG_TRACE (DEBUG::MackieControl, "MackieControlProtocol::MackieControlProtocol\n");
|
||||
|
||||
DeviceInfo::reload_device_info ();
|
||||
set_device (Config->get_mackie_device_name());
|
||||
|
||||
AudioEngine::instance()->PortConnectedOrDisconnected.connect (
|
||||
audio_engine_connections, MISSING_INVALIDATOR, ui_bind (&MackieControlProtocol::port_connected_or_disconnected, this, _2, _4, _5),
|
||||
@ -506,6 +507,10 @@ MackieControlProtocol::set_device (const string& device_name)
|
||||
|
||||
_device_info = d->second;
|
||||
|
||||
/* store it away in a global location */
|
||||
|
||||
Config->set_mackie_device_name (device_name);
|
||||
|
||||
if (_active) {
|
||||
clear_ports ();
|
||||
surfaces.clear ();
|
||||
@ -595,8 +600,6 @@ MackieControlProtocol::get_state()
|
||||
XMLNode* node = new XMLNode (X_("Protocol"));
|
||||
node->add_property (X_("name"), ARDOUR::ControlProtocol::_name);
|
||||
|
||||
node->add_property (X_("device"), _device_info.name());
|
||||
|
||||
// add current bank
|
||||
ostringstream os;
|
||||
os << _current_initial_bank;
|
||||
@ -646,10 +649,6 @@ MackieControlProtocol::set_state (const XMLNode & node, int /*version*/)
|
||||
_f_actions[n] = action;
|
||||
}
|
||||
|
||||
if ((prop = node.property (X_("device"))) != 0) {
|
||||
set_device (prop->value ());
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
@ -414,12 +414,9 @@ Strip::handle_button (Button& button, ButtonState bs)
|
||||
|
||||
_fader->set_in_use (state);
|
||||
|
||||
if (ARDOUR::Config->get_mackie_emulation() == "bcf" && state) {
|
||||
|
||||
/* BCF faders don't support touch, so add a timeout to reset
|
||||
their `in_use' state.
|
||||
if (!_surface->mcp().device_info().has_touch_sense_faders()) {
|
||||
/* add a timeout to reset their `in_use' state.
|
||||
*/
|
||||
|
||||
_surface->mcp().add_in_use_timeout (*_surface, *_fader, _fader_touch);
|
||||
}
|
||||
}
|
||||
@ -447,7 +444,7 @@ Strip::handle_fader (Fader& fader, float position)
|
||||
return;
|
||||
}
|
||||
|
||||
if (ARDOUR::Config->get_mackie_emulation() == "bcf") {
|
||||
if (!_surface->mcp().device_info().has_touch_sense_faders()) {
|
||||
/* reset the timeout while we're still moving the fader */
|
||||
_surface->mcp().add_in_use_timeout (*_surface, fader, fader.in_use_touch_control);
|
||||
}
|
||||
|
@ -9,4 +9,5 @@
|
||||
<Extenders value="0"/>
|
||||
<GlobalControls value="yes"/>
|
||||
<JogWheel value="yes"/>
|
||||
<TouchSenseFaders value="yes"/>
|
||||
</MackieProtocolDevice>
|
||||
|
@ -9,4 +9,5 @@
|
||||
<Extenders value="0"/>
|
||||
<GlobalControls value="no"/>
|
||||
<JogWheel value="no"/>
|
||||
<TouchSenseFaders value="yes"/>
|
||||
</MackieProtocolDevice>
|
||||
|
@ -9,4 +9,5 @@
|
||||
<Extenders value="1"/>
|
||||
<GlobalControls value="yes"/>
|
||||
<JogWheel value="no"/>
|
||||
<TouchSenseFaders value="yes"/>
|
||||
</MackieProtocolDevice>
|
||||
|
Loading…
Reference in New Issue
Block a user