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/disk_io.cc | |
parent | 386f69ae323bebb35ce7b950acc6479f6ff51db2 (diff) |
initial conversion to double buffering inside DiskReader
Second buffer is not used (or allocated) yet.
Diffstat (limited to 'libs/ardour/disk_io.cc')
-rw-r--r-- | libs/ardour/disk_io.cc | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/libs/ardour/disk_io.cc b/libs/ardour/disk_io.cc index a55e2c559b..cd41f78505 100644 --- a/libs/ardour/disk_io.cc +++ b/libs/ardour/disk_io.cc @@ -324,23 +324,34 @@ DiskIOProcessor::use_playlist (DataType dt, boost::shared_ptr<Playlist> playlist } DiskIOProcessor::ChannelInfo::ChannelInfo (samplecnt_t bufsize) - : rbuf (0) + : current_rbuf (0) + , read_switch_rbuf (0) , wbuf (0) , capture_transition_buf (0) , curr_capture_cnt (0) { + _rbuf[0] = 0; + _rbuf[1] = 0; } DiskIOProcessor::ChannelInfo::~ChannelInfo () { - delete rbuf; + delete _rbuf[0]; + delete _rbuf[1]; delete wbuf; delete capture_transition_buf; - rbuf = 0; + _rbuf[0] = 0; + _rbuf[1] = 0; wbuf = 0; capture_transition_buf = 0; } +PlaybackBuffer<Sample>* +DiskIOProcessor::ChannelInfo::rbuf() +{ + return _rbuf[0]; +} + void DiskIOProcessor::drop_track () { |