diff options
author | Robin Gareus <robin@gareus.org> | 2018-05-22 21:35:27 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2018-07-09 17:30:38 +0200 |
commit | 87b2c94759ab95c31bf0ba43e299eb78dcfd6385 (patch) | |
tree | d8e2b40750f2c4729b6adb09256027cf6ffd3a50 /libs/ardour/ardour/disk_io.h | |
parent | cf11764763c302242f4d803cae2c326a66c8f5d8 (diff) |
Separate ChannelInfo for disk reader and writer
This allows to use different types for write and read buffers, in
preparation for a dedicated reader-buffer.
Diffstat (limited to 'libs/ardour/ardour/disk_io.h')
-rw-r--r-- | libs/ardour/ardour/disk_io.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/libs/ardour/ardour/disk_io.h b/libs/ardour/ardour/disk_io.h index 8cba4e24f6..f39ee1d253 100644 --- a/libs/ardour/ardour/disk_io.h +++ b/libs/ardour/ardour/disk_io.h @@ -56,6 +56,7 @@ public: static const std::string state_node_name; DiskIOProcessor (Session&, const std::string& name, Flag f); + virtual ~DiskIOProcessor (); void set_route (boost::shared_ptr<Route>); void drop_route (); @@ -150,28 +151,33 @@ protected: struct ChannelInfo : public boost::noncopyable { ChannelInfo (samplecnt_t buffer_size); - ~ChannelInfo (); + virtual ~ChannelInfo (); - /** A ringbuffer for data to be played back, written to in the - butler thread, read from in the process thread. - */ + /** Ringbuffer for data to be played back. + * written to in the butler thread, read from in the process thread. + */ PBD::RingBufferNPT<Sample>* buf; + + /** A ringbuffer for data to be recorded back, written to in the + * process thread, read from in the butler thread. + */ + PBD::RingBufferNPT<Sample>* wbuf; PBD::RingBufferNPT<Sample>::rw_vector rw_vector; /* used only by capture */ boost::shared_ptr<AudioFileSource> write_source; - PBD::RingBufferNPT<CaptureTransition> * capture_transition_buf; + PBD::RingBufferNPT<CaptureTransition>* capture_transition_buf; /* used in the butler thread only */ samplecnt_t curr_capture_cnt; - void resize (samplecnt_t); + virtual void resize (samplecnt_t) = 0; }; typedef std::vector<ChannelInfo*> ChannelList; SerializedRCUManager<ChannelList> channels; - int add_channel_to (boost::shared_ptr<ChannelList>, uint32_t how_many); + virtual int add_channel_to (boost::shared_ptr<ChannelList>, uint32_t how_many) = 0; int remove_channel_from (boost::shared_ptr<ChannelList>, uint32_t how_many); boost::shared_ptr<Playlist> _playlists[DataType::num_types]; |