diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-10-22 17:06:53 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-10-22 17:07:11 -0400 |
commit | 679356c5ee1ac86ac6efa026e7ecfa514fa900d2 (patch) | |
tree | b9355fde50fb2567d3d7120a2d7c0086e79c1a02 /libs/ardour/session_midi.cc | |
parent | e32a8e82602cc37476905187a0f30733127e5580 (diff) |
fix delivery of MMC events under split process cycle conditions
Diffstat (limited to 'libs/ardour/session_midi.cc')
-rw-r--r-- | libs/ardour/session_midi.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libs/ardour/session_midi.cc b/libs/ardour/session_midi.cc index 47c7bd4c40..7becd9c667 100644 --- a/libs/ardour/session_midi.cc +++ b/libs/ardour/session_midi.cc @@ -33,6 +33,7 @@ #include "pbd/error.h" #include "pbd/pthread_utils.h" #include "pbd/timersub.h" +#include "pbd/stacktrace.h" #include "timecode/time.h" @@ -425,7 +426,7 @@ Session::send_full_time_code (framepos_t const t, MIDI::pframes_t nframes) // Send message at offset 0, sent time is for the start of this cycle MidiBuffer& mb (_midi_ports->mtc_output_port()->get_midi_buffer (nframes)); - mb.push_back (0, sizeof (msg), msg); + mb.push_back (Port::port_offset(), sizeof (msg), msg); _pframes_since_last_mtc = 0; return 0; @@ -551,6 +552,16 @@ Session::send_midi_time_code_for_cycle (framepos_t start_frame, framepos_t end_f OUTBOUND MMC STUFF **********************************************************************/ +void +Session::send_immediate_mmc (MachineControlCommand c) +{ + if (AudioEngine::instance()->in_process_thread()) { + _mmc->send (c, Port::port_offset()); + } else { + _mmc->send (c, 0); + } + +} bool Session::mmc_step_timeout () |