X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fresampler.cc;h=4476d9f1f9b2220cab1160ae876246e301a49661;hp=db5552d15ab3159b17510ca1295704d8806507a0;hb=5a5324ed3a381a86dfe0a6e3932c1d58fdcd596f;hpb=4e83acad0c2a5c528709a175a80261b8147d3b49 diff --git a/src/lib/resampler.cc b/src/lib/resampler.cc index db5552d15..4476d9f1f 100644 --- a/src/lib/resampler.cc +++ b/src/lib/resampler.cc @@ -24,6 +24,7 @@ #include "compose.hpp" #include "dcpomatic_assert.h" #include +#include #include #include "i18n.h" @@ -33,6 +34,7 @@ using std::pair; using std::make_pair; using std::runtime_error; using boost::shared_ptr; +using boost::make_shared; /** @param in Input sampling rate (Hz) * @param out Output sampling rate (Hz) @@ -62,7 +64,7 @@ Resampler::run (shared_ptr in) int in_frames = in->frames (); int in_offset = 0; int out_offset = 0; - shared_ptr resampled (new AudioBuffers (_channels, 0)); + shared_ptr resampled = make_shared (_channels, 0); while (in_frames > 0) { @@ -136,7 +138,7 @@ Resampler::run (shared_ptr in) shared_ptr Resampler::flush () { - shared_ptr out (new AudioBuffers (_channels, 0)); + shared_ptr out = make_shared (_channels, 0); int out_offset = 0; int64_t const output_size = 65536;