diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-03-01 21:02:16 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-03-01 21:02:17 +0100 |
| commit | 86c39b8c4e2428964de086f6d5b3d274c2a5e26f (patch) | |
| tree | c800710a769db07c859c5e904fa3128cb389223a /src/lib/make_centre.h | |
| parent | 54010eb460cb1038ded4177154fa63947f766a05 (diff) | |
Add new "make-centre" processor.make-centre
This just puts L into L, R into R, and (L+R)/2 into C.
Diffstat (limited to 'src/lib/make_centre.h')
| -rw-r--r-- | src/lib/make_centre.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/lib/make_centre.h b/src/lib/make_centre.h new file mode 100644 index 000000000..9ce07b81e --- /dev/null +++ b/src/lib/make_centre.h @@ -0,0 +1,35 @@ +/* + Copyright (C) 2024 Carl Hetherington <cth@carlh.net> + + This file is part of DCP-o-matic. + + DCP-o-matic is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + DCP-o-matic is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>. + +*/ + + +#include "audio_processor.h" + + +class MakeCentre : public AudioProcessor +{ +public: + std::string name() const override; + std::string id() const override; + int out_channels() const override; + std::shared_ptr<AudioProcessor> clone(int) const override; + std::shared_ptr<AudioBuffers> run(std::shared_ptr<const AudioBuffers>, int channels) override; + void make_audio_mapping_default(AudioMapping& mapping) const override; + std::vector<NamedChannel> input_names() const override; +}; |
