X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fupmixer_b.cc;h=2847da03b520341a1f557a1bab5b04285421a084;hb=7c730205e50014347bd96ab9735346d0b5922798;hp=65452424ad066dcf0bd8551414e66f43d4552ba2;hpb=5a5324ed3a381a86dfe0a6e3932c1d58fdcd596f;p=dcpomatic.git diff --git a/src/lib/upmixer_b.cc b/src/lib/upmixer_b.cc index 65452424a..2847da03b 100644 --- a/src/lib/upmixer_b.cc +++ b/src/lib/upmixer_b.cc @@ -21,7 +21,6 @@ #include "upmixer_b.h" #include "audio_buffers.h" #include "audio_mapping.h" -#include #include "i18n.h" @@ -29,7 +28,6 @@ using std::string; using std::min; using std::vector; using boost::shared_ptr; -using boost::make_shared; UpmixerB::UpmixerB (int sampling_rate) : _lfe (0.01, 150.0 / sampling_rate) @@ -60,17 +58,17 @@ UpmixerB::out_channels () const shared_ptr UpmixerB::clone (int sampling_rate) const { - return make_shared (sampling_rate); + return shared_ptr (new UpmixerB (sampling_rate)); } shared_ptr UpmixerB::run (shared_ptr in, int channels) { - shared_ptr out = make_shared (channels, in->frames()); + shared_ptr out (new AudioBuffers (channels, in->frames())); /* L + R minus 6dB (in terms of amplitude) */ shared_ptr in_LR = in->channel(0); - in_LR->accumulate_frames (in->channel(1).get(), 0, 0, in->frames()); + in_LR->accumulate_frames (in->channel(1).get(), in->frames(), 0, 0); in_LR->apply_gain (-6); if (channels > 0) { @@ -96,7 +94,7 @@ UpmixerB::run (shared_ptr in, int channels) shared_ptr S; if (channels > 4) { /* Ls is L - R with some delay */ - shared_ptr sub = make_shared (1, in->frames()); + shared_ptr sub (new AudioBuffers (1, in->frames())); sub->copy_channel_from (in.get(), 0, 0); float* p = sub->data (0); float const * q = in->data (1);