sframes_t stamp_offset,
sframes_t negative_stamp_offset,
MidiStateTracker* tracker) const;
-
+
nframes_t write_unlocked (MidiRingBuffer<nframes_t>& src,
sframes_t position,
nframes_t cnt);
set_percussive(false);
source->drop_model();
+ source->mark_streaming_midi_write_started(note_mode(), _midi_source->timeline_position());
for (Evoral::Sequence<TimeType>::const_iterator i = begin(); i != end(); ++i) {
source->append_event_unlocked_beats(*i);
}
set_percussive(old_percussive);
+ source->mark_streaming_write_completed();
set_edited(false);
void
MidiSource::mark_streaming_write_started ()
{
- sframes_t start_frame = _session.transport_frame();
-
- if (_model) {
- _model->start_write();
- }
-
- _last_write_end = start_frame;
- _writing = true;
+ NoteMode note_mode = _model ? _model->note_mode() : Sustained;
+ mark_streaming_midi_write_started(note_mode, _session.transport_frame());
}
void
} else {
break;
}
-
+
_read_data_count += ev_size;
if (ev_size > scratch_size) {
void
SMFSource::append_event_unlocked_beats (const Evoral::Event<double>& ev)
{
+ assert(_writing);
if (ev.size() == 0) {
return;
}
void
SMFSource::append_event_unlocked_frames (const Evoral::Event<nframes_t>& ev, sframes_t position)
{
+ assert(_writing);
if (ev.size() == 0) {
return;
}