X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fupmixer_a.cc;h=1edc0104db5337b6583addc9f396f354e48481ab;hb=502475a5001f580a8540e84880564d9e4c7502d4;hp=dce08fe37431212f33bfa11d2c8527e2662c5ae9;hpb=7f38d676e69639a7825e506618613051651968cf;p=dcpomatic.git diff --git a/src/lib/upmixer_a.cc b/src/lib/upmixer_a.cc index dce08fe37..1edc0104d 100644 --- a/src/lib/upmixer_a.cc +++ b/src/lib/upmixer_a.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2014 Carl Hetherington + Copyright (C) 2014-2015 Carl Hetherington This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,10 +19,13 @@ #include "upmixer_a.h" #include "audio_buffers.h" +#include "audio_mapping.h" #include "i18n.h" using std::string; +using std::min; +using std::vector; using boost::shared_ptr; UpmixerA::UpmixerA (int sampling_rate) @@ -56,7 +59,7 @@ UpmixerA::in_channels () const } int -UpmixerA::out_channels (int) const +UpmixerA::out_channels () const { return 6; } @@ -107,3 +110,22 @@ UpmixerA::flush () _ls.flush (); _rs.flush (); } + +void +UpmixerA::make_audio_mapping_default (AudioMapping& mapping) const +{ + /* Just map the first two input channels to our L/R */ + mapping.make_zero (); + for (int i = 0; i < min (2, mapping.input_channels()); ++i) { + mapping.set (i, i, 1); + } +} + +vector +UpmixerA::input_names () const +{ + vector n; + n.push_back (_("Upmix L")); + n.push_back (_("Upmix R")); + return n; +}