13
0

clear RTMidiBuffer before re-rendering into it

This commit is contained in:
Paul Davis 2019-10-17 17:34:00 -06:00
parent 0573e7cdf0
commit 604fc35e16

View File

@ -500,6 +500,7 @@ MidiPlaylist::render (RTMidiBuffer& dst, MidiChannelFilter* filter)
if (regs.size() == 1) { if (regs.size() == 1) {
tgt = &dst; tgt = &dst;
wpr.acquire (); wpr.acquire ();
dst.clear ();
} else { } else {
tgt = &evlist; tgt = &evlist;
} }
@ -526,6 +527,7 @@ MidiPlaylist::render (RTMidiBuffer& dst, MidiChannelFilter* filter)
/* Copy ordered events from event list to dst. */ /* Copy ordered events from event list to dst. */
wpr.acquire (); wpr.acquire ();
dst.clear ();
for (Evoral::EventList<samplepos_t>::iterator e = evlist.begin(); e != evlist.end(); ++e) { for (Evoral::EventList<samplepos_t>::iterator e = evlist.begin(); e != evlist.end(); ++e) {
Evoral::Event<samplepos_t>* ev (*e); Evoral::Event<samplepos_t>* ev (*e);