From 50d79c5f265aad592ae7f17209653ccbb1fde488 Mon Sep 17 00:00:00 2001 From: Tarek Soliman Date: Sat, 23 Dec 2017 15:40:30 -0600 Subject: MT32: Update to munt 2.3.0 This uses upstream commit 939cc986d9ffd044f8c6149361127ad5d94e430f Closes gh-1091 --- audio/softsynth/mt32/Analog.h | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) (limited to 'audio/softsynth/mt32/Analog.h') 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 -- cgit v1.2.3