diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-06-03 13:17:37 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-06-03 13:17:37 +0100 |
| commit | fa61fc99549264810e17fcd35abffe9e8ddab5b2 (patch) | |
| tree | 855ce952ed8b416bbab33cd6debbd0f2b7379597 /src/lib/upmixer_a.cc | |
| parent | 3b67c79bf4534e72a7eceaa6e566e7b7c949e4f7 (diff) | |
Various work on audio mapping.
Fix everything up so that the audio mapping view in
the audio panel reflects the processor (or lack of).
Diffstat (limited to 'src/lib/upmixer_a.cc')
| -rw-r--r-- | src/lib/upmixer_a.cc | 26 |
1 files changed, 24 insertions, 2 deletions
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 <cth@carlh.net> + Copyright (C) 2014-2015 Carl Hetherington <cth@carlh.net> 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<string> +UpmixerA::input_names () const +{ + vector<string> n; + n.push_back (_("Upmix L")); + n.push_back (_("Upmix R")); + return n; +} |
