diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2019-12-06 14:21:40 -0700 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2019-12-07 10:30:38 -0700 |
commit | 238cc8ed5f65d6adceb672e09ab11357150ae47d (patch) | |
tree | ec5ec68494ae6ca96206d37ca85e22a40098a3c8 /libs/ardour/ardour | |
parent | 1008ac20ffcf4a88420c5c5a9a0b2396cca04f20 (diff) |
functional double buffering when using DiskReader::overwrite_existing_buffers
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r-- | libs/ardour/ardour/disk_io.h | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/libs/ardour/ardour/disk_io.h b/libs/ardour/ardour/disk_io.h index c040ba8519..867a5e89d1 100644 --- a/libs/ardour/ardour/disk_io.h +++ b/libs/ardour/ardour/disk_io.h @@ -111,6 +111,10 @@ public: virtual void adjust_buffering() = 0; + Glib::Threads::Mutex rbuf_lock; + void queue_switch_rbuf (); + void switch_rbufs (); + protected: friend class Auditioner; virtual int seek (samplepos_t which_sample, bool complete_refill = false) = 0; @@ -143,6 +147,10 @@ protected: samplepos_t capture_val; ///< The start or end file sample position }; + bool _switch_rbuf; + int process_rbuf; + int other_rbuf; + /** Information about one audio channel, playback or capture * (depending on the derived class) */ @@ -157,19 +165,7 @@ protected: * * */ - PBD::PlaybackBuffer<Sample>* _rbuf[2]; - gint _process_rbuf; - gint _switch_rbuf; - /* This returns a pointer to the correct PlaybackBuffer to use - for reading from within process context. - */ - PBD::PlaybackBuffer<Sample>* process_rbuf (); - /* This returns a pointer to the correct PlaybackBuffer to use - for writing to within butler context. - */ - PBD::PlaybackBuffer<Sample>* other_rbuf(); - void queue_switch_rbuf (); - void maybe_switch_rbuf (); + PBD::PlaybackBuffer<Sample>* rbuf[2]; /** A ringbuffer for data to be recorded back, written to in the * process thread, read from in the butler thread. |