// 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 // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program 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 this program. If not, see . // // fx.h // // Base class for Stereo audio effects proposed in the context of the MiniDexed project // #pragma once #include #include #include "common.h" #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ TypeName(const TypeName&) = delete; \ void operator=(const TypeName&) = delete class FXBase { DISALLOW_COPY_AND_ASSIGN(FXBase); protected: FXBase(float32_t sampling_rate); virtual ~FXBase(); public: float32_t getSamplingRate() const; private: const float32_t SamplingRate; }; class FX : public FXBase { DISALLOW_COPY_AND_ASSIGN(FX); protected: FX(float32_t sampling_rate); virtual ~FX(); public: virtual void process(float32_t* left_input, float32_t* right_input, float32_t* left_output, float32_t* right_output, size_t nSamples) = 0; };