summaryrefslogtreecommitdiff
path: root/libs/ardour/disk_io.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2019-12-08 22:37:07 -0700
committerPaul Davis <paul@linuxaudiosystems.com>2019-12-08 22:39:31 -0700
commitcf7bfae926d1a3f48b4b2e9a3a9d72974f031def (patch)
tree381959d76a4397227e3969604e9eb5021ec0a52f /libs/ardour/disk_io.cc
parentb1b29a631719cbf5238af3818e7707e869d3f87d (diff)
fix error when continuing to refill audio playback buffers after a buffer switch
The file_sample[AUDIO] member was not updated to reflect the last-read sample in the switched-to buffer. Also move several methods and members from DiskIO to DiskReader where they belong.
Diffstat (limited to 'libs/ardour/disk_io.cc')
-rw-r--r--libs/ardour/disk_io.cc29
1 files changed, 0 insertions, 29 deletions
diff --git a/libs/ardour/disk_io.cc b/libs/ardour/disk_io.cc
index d6d076099e..7d153661b9 100644
--- a/libs/ardour/disk_io.cc
+++ b/libs/ardour/disk_io.cc
@@ -55,9 +55,6 @@ DiskIOProcessor::DiskIOProcessor (Session& s, string const & str, Flag f)
, in_set_state (false)
, playback_sample (0)
, _need_butler (false)
- , _switch_rbuf (false)
- , process_rbuf (0)
- , other_rbuf (1)
, channels (new ChannelList)
, _midi_buf (0)
, _samples_written_to_ringbuffer (0)
@@ -348,32 +345,6 @@ DiskIOProcessor::ChannelInfo::~ChannelInfo ()
}
void
-DiskIOProcessor::queue_switch_rbuf ()
-{
- /* must hold _rbuf_lock */
- _switch_rbuf = true;
-}
-
-void
-DiskIOProcessor::switch_rbufs ()
-{
- /* must hold _rbuf_lock */
- assert (_switch_rbuf);
-
- std::swap (process_rbuf, other_rbuf);
-
- boost::shared_ptr<ChannelList> c = channels.reader();
-
- for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) {
- (*chan)->rbuf[other_rbuf]->reset ();
- cerr << name() << " after switch/reset, other has " << (*chan)->rbuf[other_rbuf]->write_space() << " of " << (*chan)->rbuf[other_rbuf]->bufsize() << endl;
- }
-
- _switch_rbuf = false;
- cerr << "switched, pbuf now " << process_rbuf << " size " << c->front()->rbuf[process_rbuf]->bufsize() << " other " << other_rbuf << " size " << c->front()->rbuf[other_rbuf]->bufsize() << endl;
-}
-
-void
DiskIOProcessor::drop_track ()
{
_track.reset ();