summaryrefslogtreecommitdiff
path: root/src/lib/resampler.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-04-19 14:03:20 +0200
committerCarl Hetherington <cth@carlh.net>2022-04-28 23:47:04 +0200
commitee89fcb0d593d884999d911375fcc1661b963e33 (patch)
tree8a8fa5773a5db44a2caeeb3550ba37bf81a49cef /src/lib/resampler.cc
parentda9d6c40e4a7ca1ee49ffdce0ede7530b24c74e1 (diff)
Use std::vector in AudioBuffers (#2236).
Diffstat (limited to 'src/lib/resampler.cc')
-rw-r--r--src/lib/resampler.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/resampler.cc b/src/lib/resampler.cc
index 1918b9a55..adc581bb2 100644
--- a/src/lib/resampler.cc
+++ b/src/lib/resampler.cc
@@ -131,7 +131,6 @@ Resampler::run (shared_ptr<const AudioBuffers> in)
break;
}
- resampled->ensure_size (out_offset + data.output_frames_gen);
resampled->set_frames (out_offset + data.output_frames_gen);
{
@@ -176,7 +175,7 @@ Resampler::flush ()
throw EncodeError (String::compose(N_("could not run sample-rate converter (%1)"), src_strerror(r)));
}
- out->ensure_size (out_offset + data.output_frames_gen);
+ out->set_frames (out_offset + data.output_frames_gen);
auto p = data.data_out;
auto q = out->data ();
@@ -187,7 +186,6 @@ Resampler::flush ()
}
out_offset += data.output_frames_gen;
- out->set_frames (out_offset);
return out;
}