for MCP devices that don't handshake, turn them on as soon as we call ::connectivity_established() so that _active == true, and we will actually write to them
git-svn-id: svn://localhost/ardour2/branches/3.0@14165 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
95c86bec2d
commit
8f091de64b
@ -178,6 +178,12 @@ MackieControlProtocol::midi_connectivity_established ()
|
||||
for (Surfaces::const_iterator si = surfaces.begin(); si != surfaces.end(); ++si) {
|
||||
(*si)->say_hello ();
|
||||
}
|
||||
|
||||
if (_device_info.no_handshake()) {
|
||||
for (Surfaces::const_iterator si = surfaces.begin(); si != surfaces.end(); ++si) {
|
||||
(*si)->turn_it_on ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// go to the previous track.
|
||||
@ -532,19 +538,21 @@ MackieControlProtocol::update_surfaces()
|
||||
void
|
||||
MackieControlProtocol::initialize()
|
||||
{
|
||||
Glib::Threads::Mutex::Lock lm (surfaces_lock);
|
||||
{
|
||||
Glib::Threads::Mutex::Lock lm (surfaces_lock);
|
||||
|
||||
if (surfaces.empty()) {
|
||||
return;
|
||||
}
|
||||
if (surfaces.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!surfaces.front()->active ()) {
|
||||
return;
|
||||
}
|
||||
if (!surfaces.front()->active ()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// sometimes the jog wheel is a pot
|
||||
if (_device_info.has_jog_wheel()) {
|
||||
surfaces.front()->blank_jog_ring ();
|
||||
// sometimes the jog wheel is a pot
|
||||
if (_device_info.has_jog_wheel()) {
|
||||
surfaces.front()->blank_jog_ring ();
|
||||
}
|
||||
}
|
||||
|
||||
// update global buttons and displays
|
||||
|
@ -297,7 +297,6 @@ Strip::notify_gain_changed (bool force_update)
|
||||
control = _fader;
|
||||
}
|
||||
|
||||
|
||||
boost::shared_ptr<AutomationControl> ac = _route->gain_control();
|
||||
|
||||
float gain_coefficient = ac->get_value();
|
||||
|
@ -698,6 +698,8 @@ Surface::write (const MidiByteArray& data)
|
||||
{
|
||||
if (_active) {
|
||||
_port->write (data);
|
||||
} else {
|
||||
DEBUG_TRACE (DEBUG::MackieControl, "surface not active, write ignored\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -146,7 +146,8 @@ public:
|
||||
void next_jog_mode ();
|
||||
void set_jog_mode (Mackie::JogWheel::Mode);
|
||||
|
||||
void notify_metering_state_changed();
|
||||
void notify_metering_state_changed();
|
||||
void turn_it_on ();
|
||||
|
||||
protected:
|
||||
|
||||
@ -170,7 +171,6 @@ public:
|
||||
void init_strips (uint32_t n);
|
||||
void setup_master ();
|
||||
void master_gain_changed ();
|
||||
void turn_it_on ();
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -112,6 +112,7 @@ int
|
||||
SurfacePort::write (const MidiByteArray & mba)
|
||||
{
|
||||
if (mba.empty()) {
|
||||
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("port %1 asked to write an empty MBA\n", output_port().name()));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user