Respond to MMC even when synced to JACK. Fixes #3700.

git-svn-id: svn://localhost/ardour2/branches/3.0@8495 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2011-01-10 22:48:25 +00:00
parent ffccaaf0bb
commit ed72df29b7

View File

@ -93,7 +93,7 @@ Session::setup_midi_control ()
void void
Session::spp_start (Parser &, framepos_t /*timestamp*/) Session::spp_start (Parser &, framepos_t /*timestamp*/)
{ {
if (Config->get_mmc_control() && (!config.get_external_sync() || config.get_sync_source() != JACK)) { if (Config->get_mmc_control ()) {
request_transport_speed (1.0); request_transport_speed (1.0);
} }
} }
@ -107,7 +107,7 @@ Session::spp_continue (Parser& ignored, framepos_t timestamp)
void void
Session::spp_stop (Parser&, framepos_t /*timestamp*/) Session::spp_stop (Parser&, framepos_t /*timestamp*/)
{ {
if (Config->get_mmc_control()) { if (Config->get_mmc_control ()) {
request_stop (); request_stop ();
} }
} }
@ -115,7 +115,7 @@ Session::spp_stop (Parser&, framepos_t /*timestamp*/)
void void
Session::mmc_deferred_play (MIDI::MachineControl &/*mmc*/) Session::mmc_deferred_play (MIDI::MachineControl &/*mmc*/)
{ {
if (Config->get_mmc_control() && (!config.get_external_sync() || (config.get_sync_source() != JACK))) { if (Config->get_mmc_control ()) {
request_transport_speed (1.0); request_transport_speed (1.0);
} }
} }
@ -123,7 +123,7 @@ Session::mmc_deferred_play (MIDI::MachineControl &/*mmc*/)
void void
Session::mmc_record_pause (MIDI::MachineControl &/*mmc*/) Session::mmc_record_pause (MIDI::MachineControl &/*mmc*/)
{ {
if (Config->get_mmc_control()) { if (Config->get_mmc_control ()) {
maybe_enable_record(); maybe_enable_record();
} }
} }
@ -160,7 +160,7 @@ Session::mmc_record_strobe (MIDI::MachineControl &/*mmc*/)
void void
Session::mmc_record_exit (MIDI::MachineControl &/*mmc*/) Session::mmc_record_exit (MIDI::MachineControl &/*mmc*/)
{ {
if (Config->get_mmc_control()) { if (Config->get_mmc_control ()) {
disable_record (false); disable_record (false);
} }
} }
@ -168,7 +168,7 @@ Session::mmc_record_exit (MIDI::MachineControl &/*mmc*/)
void void
Session::mmc_stop (MIDI::MachineControl &/*mmc*/) Session::mmc_stop (MIDI::MachineControl &/*mmc*/)
{ {
if (Config->get_mmc_control()) { if (Config->get_mmc_control ()) {
request_stop (); request_stop ();
} }
} }
@ -176,7 +176,7 @@ Session::mmc_stop (MIDI::MachineControl &/*mmc*/)
void void
Session::mmc_pause (MIDI::MachineControl &/*mmc*/) Session::mmc_pause (MIDI::MachineControl &/*mmc*/)
{ {
if (Config->get_mmc_control()) { if (Config->get_mmc_control ()) {
/* We support RECORD_PAUSE, so the spec says that /* We support RECORD_PAUSE, so the spec says that
we must interpret PAUSE like RECORD_PAUSE if we must interpret PAUSE like RECORD_PAUSE if
@ -196,7 +196,7 @@ static bool step_queued = false;
void void
Session::mmc_step (MIDI::MachineControl &/*mmc*/, int steps) Session::mmc_step (MIDI::MachineControl &/*mmc*/, int steps)
{ {
if (!Config->get_mmc_control()) { if (!Config->get_mmc_control ()) {
return; return;
} }
@ -251,7 +251,7 @@ Session::mmc_step (MIDI::MachineControl &/*mmc*/, int steps)
void void
Session::mmc_rewind (MIDI::MachineControl &/*mmc*/) Session::mmc_rewind (MIDI::MachineControl &/*mmc*/)
{ {
if (Config->get_mmc_control()) { if (Config->get_mmc_control ()) {
request_transport_speed(-8.0f); request_transport_speed(-8.0f);
} }
} }
@ -259,7 +259,7 @@ Session::mmc_rewind (MIDI::MachineControl &/*mmc*/)
void void
Session::mmc_fast_forward (MIDI::MachineControl &/*mmc*/) Session::mmc_fast_forward (MIDI::MachineControl &/*mmc*/)
{ {
if (Config->get_mmc_control()) { if (Config->get_mmc_control ()) {
request_transport_speed(8.0f); request_transport_speed(8.0f);
} }
} }
@ -267,7 +267,7 @@ Session::mmc_fast_forward (MIDI::MachineControl &/*mmc*/)
void void
Session::mmc_locate (MIDI::MachineControl &/*mmc*/, const MIDI::byte* mmc_tc) Session::mmc_locate (MIDI::MachineControl &/*mmc*/, const MIDI::byte* mmc_tc)
{ {
if (!Config->get_mmc_control()) { if (!Config->get_mmc_control ()) {
return; return;
} }
@ -308,7 +308,7 @@ Session::mmc_locate (MIDI::MachineControl &/*mmc*/, const MIDI::byte* mmc_tc)
void void
Session::mmc_shuttle (MIDI::MachineControl &/*mmc*/, float speed, bool forw) Session::mmc_shuttle (MIDI::MachineControl &/*mmc*/, float speed, bool forw)
{ {
if (!Config->get_mmc_control()) { if (!Config->get_mmc_control ()) {
return; return;
} }
@ -326,19 +326,20 @@ Session::mmc_shuttle (MIDI::MachineControl &/*mmc*/, float speed, bool forw)
void void
Session::mmc_record_enable (MIDI::MachineControl &mmc, size_t trk, bool enabled) Session::mmc_record_enable (MIDI::MachineControl &mmc, size_t trk, bool enabled)
{ {
if (Config->get_mmc_control()) { if (!Config->get_mmc_control ()) {
return;
}
RouteList::iterator i; RouteList::iterator i;
boost::shared_ptr<RouteList> r = routes.reader(); boost::shared_ptr<RouteList> r = routes.reader();
for (i = r->begin(); i != r->end(); ++i) { for (i = r->begin(); i != r->end(); ++i) {
AudioTrack *at; AudioTrack *at;
if ((at = dynamic_cast<AudioTrack*>((*i).get())) != 0) { if ((at = dynamic_cast<AudioTrack*>((*i).get())) != 0) {
if (trk == at->remote_control_id()) { if (trk == at->remote_control_id()) {
at->set_record_enabled (enabled, &mmc); at->set_record_enabled (enabled, &mmc);
break; break;
}
} }
} }
} }