ScummVM API documentation
BReverbModel.h
1 /* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
2  * Copyright (C) 2011-2022 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation, either version 2.1 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef MT32EMU_B_REVERB_MODEL_H
19 #define MT32EMU_B_REVERB_MODEL_H
20 
21 #include "globals.h"
22 #include "internals.h"
23 #include "Enumerations.h"
24 #include "Types.h"
25 
26 namespace MT32Emu {
27 
28 class BReverbModel {
29 public:
30  static BReverbModel *createBReverbModel(const ReverbMode mode, const bool mt32CompatibleModel, const RendererType rendererType);
31 
32  virtual ~BReverbModel() {}
33  virtual bool isOpen() const = 0;
34  // After construction or a close(), open() must be called at least once before any other call (with the exception of close()).
35  virtual void open() = 0;
36  // May be called multiple times without an open() in between.
37  virtual void close() = 0;
38  virtual void mute() = 0;
39  virtual void setParameters(Bit8u time, Bit8u level) = 0;
40  virtual bool isActive() const = 0;
41  virtual bool isMT32Compatible(const ReverbMode mode) const = 0;
42  virtual bool process(const IntSample *inLeft, const IntSample *inRight, IntSample *outLeft, IntSample *outRight, Bit32u numSamples) = 0;
43  virtual bool process(const FloatSample *inLeft, const FloatSample *inRight, FloatSample *outLeft, FloatSample *outRight, Bit32u numSamples) = 0;
44 };
45 
46 } // namespace MT32Emu
47 
48 #endif // #ifndef MT32EMU_B_REVERB_MODEL_H
Definition: Analog.h:26
Definition: BReverbModel.h:28