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/midi_track.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/midi_track.cc')
-rw-r--r-- | libs/ardour/midi_track.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/ardour/midi_track.cc b/libs/ardour/midi_track.cc index 575ccdc3a5..2711f2e864 100644 --- a/libs/ardour/midi_track.cc +++ b/libs/ardour/midi_track.cc @@ -462,12 +462,12 @@ MidiTrack::snapshot_out_of_band_data (samplecnt_t nframes) * the last argument ("stop on overflow in destination") so that we'll * ship the rest out next time. * - * the Port::port_offset() + (nframes-1) argument puts all these events at the last + * the (nframes-1) argument puts all these events at the last * possible position of the output buffer, so that we do not - * violate monotonicity when writing. Port::port_offset() will - * be non-zero if we're in a split process cycle. + * violate monotonicity when writing. */ - _immediate_events.read (_immediate_event_buffer, 0, 1, Port::port_offset() + nframes - 1, true); + + _immediate_events.read (_immediate_event_buffer, 0, 1, nframes - 1, true); } void @@ -821,7 +821,7 @@ MidiTrack::act_on_mute () } /* Resolve active notes. */ - _disk_reader->resolve_tracker(_immediate_events, Port::port_offset()); + _disk_reader->resolve_tracker (_immediate_events, 0); } } @@ -873,7 +873,7 @@ void MidiTrack::realtime_handle_transport_stopped () { Route::realtime_handle_transport_stopped (); - _disk_reader->resolve_tracker (_immediate_events, Port::port_offset()); + _disk_reader->resolve_tracker (_immediate_events, 0); } void |