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:
@@ -397,6 +397,18 @@ Auditioner::audition_region (boost::shared_ptr<Region> region)
|
|||||||
}
|
}
|
||||||
|
|
||||||
_disk_reader->seek (offset, true);
|
_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;
|
current_sample = offset;
|
||||||
|
|
||||||
g_atomic_int_set (&_auditioning, 1);
|
g_atomic_int_set (&_auditioning, 1);
|
||||||
|
|||||||
@@ -1222,6 +1222,9 @@ void
|
|||||||
Session::non_realtime_overwrite (int on_entry, bool& finished)
|
Session::non_realtime_overwrite (int on_entry, bool& finished)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<RouteList> rl = routes.reader();
|
boost::shared_ptr<RouteList> rl = routes.reader();
|
||||||
|
if (is_auditioning ()) {
|
||||||
|
rl->push_back (auditioner);
|
||||||
|
}
|
||||||
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
|
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
|
||||||
boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
|
boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
|
||||||
if (tr && tr->pending_overwrite ()) {
|
if (tr && tr->pending_overwrite ()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user