diff --git a/libs/ardour/ardour/audioregion.h b/libs/ardour/ardour/audioregion.h index f28296d81e..0b8215bfa4 100644 --- a/libs/ardour/ardour/audioregion.h +++ b/libs/ardour/ardour/audioregion.h @@ -121,9 +121,10 @@ class LIBARDOUR_API AudioRegion : public Region, public AudioReadable samplecnt_t cnt, uint32_t chan_n = 0) const; - samplecnt_t master_read_at (Sample *buf, Sample *mixdown_buf, float *gain_buf, - samplepos_t position, samplecnt_t cnt, - uint32_t chan_n=0) const; + samplecnt_t master_read_at (Sample* buf, + samplepos_t position, + samplecnt_t cnt, + uint32_t chan_n=0) const; samplecnt_t read_raw_internal (Sample*, samplepos_t, samplecnt_t, int channel) const; diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc index 9af69c29b4..7d39ea18e7 100644 --- a/libs/ardour/audioregion.cc +++ b/libs/ardour/audioregion.cc @@ -475,8 +475,7 @@ AudioRegion::read (Sample* buf, samplepos_t pos, samplecnt_t cnt, int channel) c } samplecnt_t -AudioRegion::master_read_at (Sample* buf, Sample* /*mixdown_buffer*/, float* /*gain_buffer*/, - samplepos_t position, samplecnt_t cnt, uint32_t chan_n) const +AudioRegion::master_read_at (Sample* buf, samplepos_t position, samplecnt_t cnt, uint32_t chan_n) const { /* do not read gain/scaling/fades and do not count this disk i/o in statistics */ diff --git a/libs/ardour/lua_api.cc b/libs/ardour/lua_api.cc index f69c9fbb82..6dc818ad90 100644 --- a/libs/ardour/lua_api.cc +++ b/libs/ardour/lua_api.cc @@ -1216,7 +1216,7 @@ LuaAPI::Rubberband::set_mapping (luabridge::LuaRef tbl) samplecnt_t LuaAPI::Rubberband::read (Sample* buf, samplepos_t pos, samplecnt_t cnt, int channel) const { - return _region->master_read_at (buf, NULL, NULL, _read_offset + pos, cnt, channel); + return _region->master_read_at (buf, _read_offset + pos, cnt, channel); } static void null_deleter (LuaAPI::Rubberband*) {} diff --git a/libs/ardour/rb_effect.cc b/libs/ardour/rb_effect.cc index 0665cfc221..e82ed01ddf 100644 --- a/libs/ardour/rb_effect.cc +++ b/libs/ardour/rb_effect.cc @@ -77,7 +77,6 @@ RBEffect::run (std::shared_ptr r, Progress* progress) SourceList nsrcs; int ret = -1; const samplecnt_t bufsize = 8192; - gain_t* gain_buffer = 0; Sample** buffers = 0; char suffix[32]; string new_name; @@ -201,8 +200,7 @@ RBEffect::run (std::shared_ptr r, Progress* progress) goto out; } - gain_buffer = new gain_t[bufsize]; - buffers = new float*[channels]; + buffers = new float*[channels]; for (uint32_t i = 0; i < channels; ++i) { buffers[i] = new float[bufsize]; @@ -225,8 +223,6 @@ RBEffect::run (std::shared_ptr r, Progress* progress) region->start_sample () + region->position_sample (); this_read = region->master_read_at (buffers[i], - buffers[i], - gain_buffer, this_position, this_time, i); @@ -262,8 +258,6 @@ RBEffect::run (std::shared_ptr r, Progress* progress) region->start_sample () + region->position_sample (); this_read = region->master_read_at (buffers[i], - buffers[i], - gain_buffer, this_position, this_time, i); @@ -377,8 +371,6 @@ RBEffect::run (std::shared_ptr r, Progress* progress) out: - delete[] gain_buffer; - if (buffers) { for (uint32_t i = 0; i < channels; ++i) { delete[] buffers[i]; diff --git a/libs/ardour/st_stretch.cc b/libs/ardour/st_stretch.cc index 424a3663a0..ab37198e0a 100644 --- a/libs/ardour/st_stretch.cc +++ b/libs/ardour/st_stretch.cc @@ -60,7 +60,6 @@ STStretch::run (std::shared_ptr r, Progress* progress) SourceList nsrcs; int ret = -1; const samplecnt_t bufsize = 8192; - gain_t* gain_buffer = 0; Sample** buffers = 0; char suffix[32]; string new_name; @@ -181,8 +180,7 @@ STStretch::run (std::shared_ptr r, Progress* progress) goto out; } - gain_buffer = new gain_t[bufsize]; - buffers = new float*[channels]; + buffers = new float*[channels]; for (uint32_t i = 0; i < channels; ++i) { buffers[i] = new float[bufsize]; @@ -208,8 +206,6 @@ STStretch::run (std::shared_ptr r, Progress* progress) region->start () + region->position (); this_read = region->master_read_at (buffers[i], - buffers[i], - gain_buffer, this_position, this_time, i); @@ -319,8 +315,6 @@ STStretch::run (std::shared_ptr r, Progress* progress) out: - delete[] gain_buffer; - if (buffers) { for (uint32_t i = 0; i < channels; ++i) { delete[] buffers[i];