Clear existing data before reading new to make overwrite_existing_buffers() work correctly. Should fix #3481.
git-svn-id: svn://localhost/ardour2/branches/3.0@8256 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
6fff4dcdda
commit
9a1f83923d
@ -629,6 +629,12 @@ MidiDiskstream::set_pending_overwrite (bool yn)
|
||||
int
|
||||
MidiDiskstream::overwrite_existing_buffers ()
|
||||
{
|
||||
/* This is safe as long as the butler thread is suspended, which it should be */
|
||||
_playback_buf->reset ();
|
||||
|
||||
g_atomic_int_set (&_frames_read_from_ringbuffer, 0);
|
||||
g_atomic_int_set (&_frames_written_to_ringbuffer, 0);
|
||||
|
||||
read (overwrite_frame, disk_io_chunk_frames, false);
|
||||
overwrite_queued = false;
|
||||
_pending_overwrite = false;
|
||||
|
Loading…
Reference in New Issue
Block a user