WE Core
Loading...
Searching...
No Matches
EffectsProcessor.h
Go to the documentation of this file.
1/*
2 * File: EffectsProcessor.h
3 *
4 * Created: 03/12/2020
5 *
6 * This file is part of WECore.
7 *
8 * WECore is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * WECore is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with WECore. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#pragma once
23
24namespace WECore {
25
29 template <typename SampleType>
31 static_assert(std::is_floating_point<SampleType>::value,
32 "Must be provided with a floating point template type");
33
34 public:
36 virtual ~EffectsProcessorBase() = default;
37
43 inline virtual void reset() {}
44 };
45
49 template <typename SampleType>
50 class EffectsProcessor1in1out : public EffectsProcessorBase<SampleType> {
51 public:
53 virtual ~EffectsProcessor1in1out() override = default;
54
55 virtual void process1in1out(SampleType* inSamples, size_t numSamples) = 0;
56 };
57
61 template <typename SampleType>
62 class EffectsProcessor1in2out : public EffectsProcessorBase<SampleType> {
63 public:
65 virtual ~EffectsProcessor1in2out() override = default;
66
67 virtual void process1in2out(SampleType* inSamplesLeft, SampleType* inSamplesRight, size_t numSamples) = 0;
68 };
69
73 template <typename SampleType>
74 class EffectsProcessor2in2out : public EffectsProcessorBase<SampleType> {
75 public:
77 virtual ~EffectsProcessor2in2out() override = default;
78
79 virtual void process2in2out(SampleType* inSamplesLeft, SampleType* inSamplesRight, size_t numSamples) = 0;
80 };
81}
virtual void process1in1out(SampleType *inSamples, size_t numSamples)=0
virtual ~EffectsProcessor1in1out() override=default
virtual void process1in2out(SampleType *inSamplesLeft, SampleType *inSamplesRight, size_t numSamples)=0
virtual ~EffectsProcessor1in2out() override=default
virtual ~EffectsProcessor2in2out() override=default
virtual void process2in2out(SampleType *inSamplesLeft, SampleType *inSamplesRight, size_t numSamples)=0
virtual ~EffectsProcessorBase()=default