diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2019-12-05 15:01:41 -0700 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2019-12-07 10:30:38 -0700 |
commit | 8d05f6d4b788d2f100eb309965d398adc4198045 (patch) | |
tree | 243f962df5e70e34f4f9808963780263c64e734b /libs/ardour/ardour | |
parent | 386f69ae323bebb35ce7b950acc6479f6ff51db2 (diff) |
initial conversion to double buffering inside DiskReader
Second buffer is not used (or allocated) yet.
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r-- | libs/ardour/ardour/disk_io.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/libs/ardour/ardour/disk_io.h b/libs/ardour/ardour/disk_io.h index 1c60a19fc2..43898551a8 100644 --- a/libs/ardour/ardour/disk_io.h +++ b/libs/ardour/ardour/disk_io.h @@ -151,10 +151,19 @@ protected: ChannelInfo (samplecnt_t buffer_size); virtual ~ChannelInfo (); - /** A random-access ringbuffer for data to be played back. - * written to in the butler thread, read from in the process thread. + /** A pair of random-access ringbuffers for data to be played back. + * written to in the butler thread, read from in the process + * thread. + * + * */ - PBD::PlaybackBuffer<Sample>* rbuf; + PBD::PlaybackBuffer<Sample>* _rbuf[2]; + /* This returns a pointer to the correct PlaybackBuffer to use + for reading from within process context. + */ + PBD::PlaybackBuffer<Sample>* rbuf(); + gint current_rbuf; + gint read_switch_rbuf; /** A ringbuffer for data to be recorded back, written to in the * process thread, read from in the butler thread. |