summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2020-04-08 01:08:57 +0200
committerRobin Gareus <robin@gareus.org>2020-04-08 01:09:40 +0200
commit648beb94a04b018411b6744859f17923fa65ec3d (patch)
treeb70db3d02fde40e74533ffbf6a5049ac5ecd56e4 /libs/ardour/ardour
parente893c317010792c8e19220bc2b91adb68083ae5a (diff)
Fix false-positive under-run messages
Port (or Tracks) can be safely added during playback, however the disk-reader's playback buffer is initially empty. This lead to false-positive Underrun() signals when processing takes place before or concurrently with re-filling the disk-buffer for the new channels. Now new empty buffers are ignored, and produce silence until the initial refill is complete. There is however no per-channel de-click in, yet. This fixes: play some audio track, ctrl+drag a region to the drop-zone, creating a new track while playing.
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/disk_reader.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/ardour/ardour/disk_reader.h b/libs/ardour/ardour/disk_reader.h
index ffd4e2a875..2e1ab6aec6 100644
--- a/libs/ardour/ardour/disk_reader.h
+++ b/libs/ardour/ardour/disk_reader.h
@@ -123,6 +123,7 @@ protected:
: DiskIOProcessor::ChannelInfo (buffer_size)
, pre_loop_buffer (0)
, pre_loop_buffer_size (0)
+ , initialized (false)
{
resize (buffer_size);
resize_preloop (preloop_size);
@@ -134,6 +135,7 @@ protected:
Sample* pre_loop_buffer;
samplecnt_t pre_loop_buffer_size;
+ bool initialized;
};
XMLNode& state ();