summaryrefslogtreecommitdiff
path: root/libs/ardour/auditioner.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2020-04-22 05:09:30 +0200
committerRobin Gareus <robin@gareus.org>2020-04-22 05:09:30 +0200
commit2d11667ce3d2ada93c0fb90978bdcc054413c2bb (patch)
treeee71a5ebe7214a52c948a33a3d97b6455816bff3 /libs/ardour/auditioner.cc
parentd03a3903a0e9c50b88c1fed1b7554be60b38940f (diff)
Fix MIDI audition and audition seeking
DiskReader::seek() no longer fills MIDI buffers. MIDI is now read into memory via DR:overwrite_existing_buffers() There is still some edge-case remaining to be fixed. For some reasons the synth does not receive initial patch/program changes when starting auditioning.
Diffstat (limited to 'libs/ardour/auditioner.cc')
-rw-r--r--libs/ardour/auditioner.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/ardour/auditioner.cc b/libs/ardour/auditioner.cc
index 71129ccd11..ba51922a8f 100644
--- a/libs/ardour/auditioner.cc
+++ b/libs/ardour/auditioner.cc
@@ -397,6 +397,18 @@ Auditioner::audition_region (boost::shared_ptr<Region> region)
}
_disk_reader->seek (offset, true);
+
+ if (_midi_audition) {
+ /* Fill MIDI buffers.
+ * This is safe to call from here. ::::audition_region()
+ * is called by the butler thread. Also the session is not
+ * yet auditioning. So Session::non_realtime_overwrite()
+ * does call the auditioner's DR.
+ */
+ set_pending_overwrite (PlaylistModified);
+ _disk_reader->overwrite_existing_buffers ();
+ }
+
current_sample = offset;
g_atomic_int_set (&_auditioning, 1);