13
0

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.
This commit is contained in:
Robin Gareus 2020-04-22 05:09:30 +02:00
parent d03a3903a0
commit 2d11667ce3
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 15 additions and 0 deletions

View File

@ -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);

View File

@ -1222,6 +1222,9 @@ void
Session::non_realtime_overwrite (int on_entry, bool& finished)
{
boost::shared_ptr<RouteList> rl = routes.reader();
if (is_auditioning ()) {
rl->push_back (auditioner);
}
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
if (tr && tr->pending_overwrite ()) {