X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fresampler.cc;h=e414436e8b39960c6c5f78ca16188c0781bc0407;hb=b56bc3c45953fe113a9934b0d2ec2c1134de07ab;hp=e7f50c4b7bf7fc2174248b2317d3d50d45813da9;hpb=6bc83f72f12c8513a1e9e9b6fd880697a73f968f;p=dcpomatic.git diff --git a/src/lib/resampler.cc b/src/lib/resampler.cc index e7f50c4b7..e414436e8 100644 --- a/src/lib/resampler.cc +++ b/src/lib/resampler.cc @@ -60,11 +60,9 @@ Resampler::~Resampler () swr_free (&_swr_context); } -pair, AudioContent::Frame> -Resampler::run (shared_ptr in, AudioContent::Frame frame) +shared_ptr +Resampler::run (shared_ptr in) { - AudioContent::Frame const resamp_time = swr_next_pts (_swr_context, frame * _out_rate) / _in_rate; - /* Compute the resampled frames count and add 32 for luck */ int const max_resampled_frames = ceil ((double) in->frames() * _out_rate / _in_rate) + 32; shared_ptr resampled (new AudioBuffers (_channels, max_resampled_frames)); @@ -80,7 +78,7 @@ Resampler::run (shared_ptr in, AudioContent::Frame frame) } resampled->set_frames (resampled_frames); - return make_pair (resampled, resamp_time); + return resampled; } shared_ptr