Remove unused disk-reader vari-speed

This commit is contained in:
Robin Gareus
2018-05-22 20:52:01 +02:00
parent cdec333bfe
commit cf11764763
3 changed files with 15 additions and 35 deletions

View File

@@ -45,7 +45,7 @@ template<typename T> class MidiRingBuffer;
class LIBARDOUR_API DiskIOProcessor : public Processor
{
public:
public:
enum Flag {
Recordable = 0x1,
Hidden = 0x2,
@@ -108,11 +108,11 @@ class LIBARDOUR_API DiskIOProcessor : public Processor
virtual void adjust_buffering() = 0;
protected:
protected:
friend class Auditioner;
virtual int seek (samplepos_t which_sample, bool complete_refill = false) = 0;
protected:
protected:
Flag _flags;
uint32_t i_am_the_modifier;
double _actual_speed;
@@ -174,8 +174,6 @@ class LIBARDOUR_API DiskIOProcessor : public Processor
int add_channel_to (boost::shared_ptr<ChannelList>, uint32_t how_many);
int remove_channel_from (boost::shared_ptr<ChannelList>, uint32_t how_many);
CubicInterpolation interpolation;
boost::shared_ptr<Playlist> _playlists[DataType::num_types];
PBD::ScopedConnectionList playlist_connections;

View File

@@ -223,7 +223,6 @@ DiskIOProcessor::add_channel_to (boost::shared_ptr<ChannelList> c, uint32_t how_
{
while (how_many--) {
c->push_back (new ChannelInfo (_session.butler()->audio_diskstream_playback_buffer_size()));
interpolation.add_channel ();
DEBUG_TRACE (DEBUG::DiskIO, string_compose ("%1: new channel, write space = %2 read = %3\n",
name(),
c->back()->buf->write_space(),
@@ -248,7 +247,6 @@ DiskIOProcessor::remove_channel_from (boost::shared_ptr<ChannelList> c, uint32_t
while (how_many-- && !c->empty()) {
delete c->back();
c->pop_back();
interpolation.remove_channel ();
}
return 0;

View File

@@ -268,16 +268,15 @@ DiskReader::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_samp
goto midi;
}
if (speed != 1.0f && speed != -1.0f) {
interpolation.set_speed (speed);
disk_samples_to_consume = interpolation.distance (nframes);
if (speed < 0.0) {
disk_samples_to_consume = -disk_samples_to_consume;
}
} else {
disk_samples_to_consume = nframes;
}
assert (speed == -1 || speed == 0 || speed == 1);
if (speed < 0) {
disk_samples_to_consume = -nframes;
} else if (speed > 0) {
disk_samples_to_consume = nframes;
} else {
disk_samples_to_consume = 0;
}
if (!result_required || ((ms & MonitoringDisk) == 0) || still_locating || _no_disk_output) {
@@ -350,11 +349,7 @@ DiskReader::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_samp
if (disk_samples_to_consume <= (samplecnt_t) chaninfo->rw_vector.len[0]) {
if (fabsf (speed) != 1.0f) {
samplecnt_t ocnt = nframes;
samplecnt_t icnt = chaninfo->rw_vector.len[0];
(void) interpolation.interpolate (n, icnt, chaninfo->rw_vector.buf[0], ocnt, disk_signal);
} else if (speed != 0.0) {
if (speed != 0.0) {
memcpy (disk_signal, chaninfo->rw_vector.buf[0], sizeof (Sample) * disk_samples_to_consume);
}
@@ -364,22 +359,11 @@ DiskReader::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_samp
if (disk_samples_to_consume <= total) {
if (fabsf (speed) != 1.0f) {
samplecnt_t ocnt = nframes;
interpolation.interpolate (n, chaninfo->rw_vector.len[0], chaninfo->rw_vector.buf[0], ocnt, disk_signal);
if (ocnt < nframes) {
disk_signal += ocnt;
ocnt = nframes - ocnt;
interpolation.interpolate (n, chaninfo->rw_vector.len[1], chaninfo->rw_vector.buf[1], ocnt, disk_signal);
}
} else if (speed != 0.0) {
memcpy (disk_signal,
if (speed != 0.0) {
memcpy (disk_signal,
chaninfo->rw_vector.buf[0],
chaninfo->rw_vector.len[0] * sizeof (Sample));
memcpy (disk_signal + chaninfo->rw_vector.len[0],
memcpy (disk_signal + chaninfo->rw_vector.len[0],
chaninfo->rw_vector.buf[1],
(disk_samples_to_consume - chaninfo->rw_vector.len[0]) * sizeof (Sample));
}