void
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);
}
}
void
Session::spp_stop (Parser&, framepos_t /*timestamp*/)
{
- if (Config->get_mmc_control()) {
+ if (Config->get_mmc_control ()) {
request_stop ();
}
}
void
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);
}
}
void
Session::mmc_record_pause (MIDI::MachineControl &/*mmc*/)
{
- if (Config->get_mmc_control()) {
+ if (Config->get_mmc_control ()) {
maybe_enable_record();
}
}
void
Session::mmc_record_exit (MIDI::MachineControl &/*mmc*/)
{
- if (Config->get_mmc_control()) {
+ if (Config->get_mmc_control ()) {
disable_record (false);
}
}
void
Session::mmc_stop (MIDI::MachineControl &/*mmc*/)
{
- if (Config->get_mmc_control()) {
+ if (Config->get_mmc_control ()) {
request_stop ();
}
}
void
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 must interpret PAUSE like RECORD_PAUSE if
void
Session::mmc_step (MIDI::MachineControl &/*mmc*/, int steps)
{
- if (!Config->get_mmc_control()) {
+ if (!Config->get_mmc_control ()) {
return;
}
void
Session::mmc_rewind (MIDI::MachineControl &/*mmc*/)
{
- if (Config->get_mmc_control()) {
+ if (Config->get_mmc_control ()) {
request_transport_speed(-8.0f);
}
}
void
Session::mmc_fast_forward (MIDI::MachineControl &/*mmc*/)
{
- if (Config->get_mmc_control()) {
+ if (Config->get_mmc_control ()) {
request_transport_speed(8.0f);
}
}
void
Session::mmc_locate (MIDI::MachineControl &/*mmc*/, const MIDI::byte* mmc_tc)
{
- if (!Config->get_mmc_control()) {
+ if (!Config->get_mmc_control ()) {
return;
}
void
Session::mmc_shuttle (MIDI::MachineControl &/*mmc*/, float speed, bool forw)
{
- if (!Config->get_mmc_control()) {
+ if (!Config->get_mmc_control ()) {
return;
}
void
Session::mmc_record_enable (MIDI::MachineControl &mmc, size_t trk, bool enabled)
{
- if (Config->get_mmc_control()) {
-
- RouteList::iterator i;
- boost::shared_ptr<RouteList> r = routes.reader();
-
- for (i = r->begin(); i != r->end(); ++i) {
- AudioTrack *at;
+ if (!Config->get_mmc_control ()) {
+ return;
+ }
- if ((at = dynamic_cast<AudioTrack*>((*i).get())) != 0) {
- if (trk == at->remote_control_id()) {
- at->set_record_enabled (enabled, &mmc);
- break;
- }
+ RouteList::iterator i;
+ boost::shared_ptr<RouteList> r = routes.reader();
+
+ for (i = r->begin(); i != r->end(); ++i) {
+ AudioTrack *at;
+
+ if ((at = dynamic_cast<AudioTrack*>((*i).get())) != 0) {
+ if (trk == at->remote_control_id()) {
+ at->set_record_enabled (enabled, &mmc);
+ break;
}
}
}