diff options
author | Tarek Soliman | 2017-12-23 15:40:30 -0600 |
---|---|---|
committer | Tarek Soliman | 2018-01-03 10:40:23 -0600 |
commit | 50d79c5f265aad592ae7f17209653ccbb1fde488 (patch) | |
tree | 1951526e3ff2910acb0588f3a23ba0e9e7e66544 /audio/softsynth/mt32/Analog.h | |
parent | bb5e8d3a11711d409f89739cf3f054cd5bac8c4f (diff) | |
download | scummvm-rg350-50d79c5f265aad592ae7f17209653ccbb1fde488.tar.gz scummvm-rg350-50d79c5f265aad592ae7f17209653ccbb1fde488.tar.bz2 scummvm-rg350-50d79c5f265aad592ae7f17209653ccbb1fde488.zip |
MT32: Update to munt 2.3.0
This uses upstream commit 939cc986d9ffd044f8c6149361127ad5d94e430f
Closes gh-1091
Diffstat (limited to 'audio/softsynth/mt32/Analog.h')
-rw-r--r-- | audio/softsynth/mt32/Analog.h | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/audio/softsynth/mt32/Analog.h b/audio/softsynth/mt32/Analog.h index ee642f280d..3b6dcabfa3 100644 --- a/audio/softsynth/mt32/Analog.h +++ b/audio/softsynth/mt32/Analog.h @@ -1,5 +1,5 @@ /* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher - * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev + * Copyright (C) 2011-2017 Dean Beeler, Jerome Fisher, Sergey V. Mikayev * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -20,13 +20,11 @@ #include "globals.h" #include "internals.h" -#include "Types.h" #include "Enumerations.h" +#include "Types.h" namespace MT32Emu { -class AbstractLowPassFilter; - /* Analog class is dedicated to perform fair emulation of analogue circuitry of hardware units that is responsible * for processing output signal after the DAC. It appears that the analogue circuit labeled "LPF" on the schematic * also applies audible changes to the signal spectra. There is a significant boost of higher frequencies observed @@ -38,21 +36,16 @@ class AbstractLowPassFilter; */ class Analog { public: - Analog(const AnalogOutputMode mode, const bool oldMT32AnalogLPF); - ~Analog(); - void process(Sample *outStream, const Sample *nonReverbLeft, const Sample *nonReverbRight, const Sample *reverbDryLeft, const Sample *reverbDryRight, const Sample *reverbWetLeft, const Sample *reverbWetRight, Bit32u outLength); - unsigned int getOutputSampleRate() const; - Bit32u getDACStreamsLength(Bit32u outputLength) const; - void setSynthOutputGain(float synthGain); - void setReverbOutputGain(float reverbGain, bool mt32ReverbCompatibilityMode); - -private: - AbstractLowPassFilter &leftChannelLPF; - AbstractLowPassFilter &rightChannelLPF; - SampleEx synthGain; - SampleEx reverbGain; - - Analog(Analog &); + static Analog *createAnalog(const AnalogOutputMode mode, const bool oldMT32AnalogLPF, const RendererType rendererType); + + virtual ~Analog() {} + virtual unsigned int getOutputSampleRate() const = 0; + virtual Bit32u getDACStreamsLength(const Bit32u outputLength) const = 0; + virtual void setSynthOutputGain(const float synthGain) = 0; + virtual void setReverbOutputGain(const float reverbGain, const bool mt32ReverbCompatibilityMode) = 0; + + virtual bool process(IntSample *outStream, const IntSample *nonReverbLeft, const IntSample *nonReverbRight, const IntSample *reverbDryLeft, const IntSample *reverbDryRight, const IntSample *reverbWetLeft, const IntSample *reverbWetRight, Bit32u outLength) = 0; + virtual bool process(FloatSample *outStream, const FloatSample *nonReverbLeft, const FloatSample *nonReverbRight, const FloatSample *reverbDryLeft, const FloatSample *reverbDryRight, const FloatSample *reverbWetLeft, const FloatSample *reverbWetRight, Bit32u outLength) = 0; }; } // namespace MT32Emu |