X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fmid_side_decoder.cc;h=eb87d245b54b7dc6168039157810ad2b68dbb91a;hb=28111007e2e6fd62f5810be780706ae1618bd33f;hp=8d5dc1875b76c2bf38e66181b206c588fecd0b84;hpb=5a5324ed3a381a86dfe0a6e3932c1d58fdcd596f;p=dcpomatic.git diff --git a/src/lib/mid_side_decoder.cc b/src/lib/mid_side_decoder.cc index 8d5dc1875..eb87d245b 100644 --- a/src/lib/mid_side_decoder.cc +++ b/src/lib/mid_side_decoder.cc @@ -21,15 +21,13 @@ #include "mid_side_decoder.h" #include "audio_buffers.h" #include "audio_mapping.h" -#include #include "i18n.h" using std::string; using std::min; using std::vector; -using boost::shared_ptr; -using boost::make_shared; +using std::shared_ptr; string MidSideDecoder::name () const @@ -52,14 +50,14 @@ MidSideDecoder::out_channels () const shared_ptr MidSideDecoder::clone (int) const { - return make_shared (); + return shared_ptr (new MidSideDecoder ()); } shared_ptr MidSideDecoder::run (shared_ptr in, int channels) { int const N = min (channels, 3); - shared_ptr out = make_shared (channels, in->frames ()); + shared_ptr out (new AudioBuffers (channels, in->frames ())); for (int i = 0; i < in->frames(); ++i) { float const left = in->data()[0][i]; float const right = in->data()[1][i]; @@ -92,13 +90,11 @@ MidSideDecoder::make_audio_mapping_default (AudioMapping& mapping) const } } -vector +vector MidSideDecoder::input_names () const { - vector n; - - n.push_back (_("Left")); - n.push_back (_("Right")); - + vector n; + n.push_back (NamedChannel(_("Left"), 0)); + n.push_back (NamedChannel(_("Right"), 1)); return n; }