diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2019-11-04 12:57:19 -0700 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2019-11-04 12:57:19 -0700 |
commit | 62c4e88a9d8f4a7b019243fe9a10830b1da0150c (patch) | |
tree | 59f4809ddcc999d09898348cea9ca79e2fd20a54 /libs/ardour/session_midi.cc | |
parent | 47672fceec568949d8dcf3f2be516a644ff4ccbd (diff) |
avoid use of Port::port_offset() everywhere except Port::flush_buffers() and Port::get_buffer()
Split cycles are run as if they are an entire self-contained cycle, starting at zero and running for "nframes".
We adjust the timing and position of data only when retrieving and writing it to Port buffers.
Diffstat (limited to 'libs/ardour/session_midi.cc')
-rw-r--r-- | libs/ardour/session_midi.cc | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/libs/ardour/session_midi.cc b/libs/ardour/session_midi.cc index 2e77aa6ef2..6967a1cdf5 100644 --- a/libs/ardour/session_midi.cc +++ b/libs/ardour/session_midi.cc @@ -456,7 +456,7 @@ Session::send_full_time_code (samplepos_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 (Port::port_offset(), sizeof (msg), msg); + mb.push_back (0, sizeof (msg), msg); _pframes_since_last_mtc = 0; return 0; @@ -558,7 +558,7 @@ Session::send_midi_time_code_for_cycle (samplepos_t start_sample, samplepos_t en assert (out_stamp < nframes); MidiBuffer& mb (_midi_ports->mtc_output_port()->get_midi_buffer(nframes)); - if (!mb.push_back (Port::port_offset () + out_stamp, 2, mtc_msg)) { + if (!mb.push_back (out_stamp, 2, mtc_msg)) { error << string_compose(_("Session: cannot send quarter-frame MTC message (%1)"), strerror (errno)) << endmsg; return -1; @@ -598,12 +598,7 @@ Session::send_midi_time_code_for_cycle (samplepos_t start_sample, samplepos_t en void Session::send_immediate_mmc (MachineControlCommand c) { - if (AudioEngine::instance()->in_process_thread()) { - _mmc->send (c, Port::port_offset()); - } else { - _mmc->send (c, 0); - } - + _mmc->send (c, 0); } bool |