13
0

add ::render() to MidiModel since that's what we'll be editing

This commit is contained in:
Paul Davis 2024-06-26 06:55:40 -06:00
parent fcfa4fecb4
commit 7bf464795a
2 changed files with 9 additions and 0 deletions

View File

@ -327,6 +327,7 @@ public:
void transpose (NoteDiffCommand *, const NotePtr, int);
void track_state (timepos_t const & when, MidiStateTracker&) const;
void render (const ReadLock& lock, Evoral::EventSink<Temporal::Beats>& dst);
protected:
int resolve_overlaps_unlocked (const NotePtr, void* arg = 0);

View File

@ -1882,3 +1882,11 @@ MidiModel::track_state (timepos_t const & when, MidiStateTracker& mst) const
mst.track (ev.buffer());
}
}
void
MidiModel::render (const ReadLock& lock, Evoral::EventSink<Temporal::Beats>& dst)
{
for (auto const & ev : *this) {
dst.write (ev.time(), Evoral::MIDI_EVENT, ev.size(), ev.buffer());
}
}