aboutsummaryrefslogtreecommitdiff
path: root/audio/softsynth/mt32/SampleRateConverter.h
diff options
context:
space:
mode:
authorTarek Soliman2017-12-23 15:40:30 -0600
committerTarek Soliman2018-01-03 10:40:23 -0600
commit50d79c5f265aad592ae7f17209653ccbb1fde488 (patch)
tree1951526e3ff2910acb0588f3a23ba0e9e7e66544 /audio/softsynth/mt32/SampleRateConverter.h
parentbb5e8d3a11711d409f89739cf3f054cd5bac8c4f (diff)
downloadscummvm-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/SampleRateConverter.h')
-rw-r--r--audio/softsynth/mt32/SampleRateConverter.h21
1 files changed, 9 insertions, 12 deletions
diff --git a/audio/softsynth/mt32/SampleRateConverter.h b/audio/softsynth/mt32/SampleRateConverter.h
index 24bce0891b..e8950111f0 100644
--- a/audio/softsynth/mt32/SampleRateConverter.h
+++ b/audio/softsynth/mt32/SampleRateConverter.h
@@ -14,8 +14,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef SAMPLE_RATE_CONVERTER_H
-#define SAMPLE_RATE_CONVERTER_H
+#ifndef MT32EMU_SAMPLE_RATE_CONVERTER_H
+#define MT32EMU_SAMPLE_RATE_CONVERTER_H
#include "globals.h"
#include "Types.h"
@@ -33,21 +33,17 @@ class Synth;
*/
class MT32EMU_EXPORT SampleRateConverter {
public:
- enum Quality {
- // Use this only when the speed is more important than the audio quality.
- FASTEST,
- FAST,
- GOOD,
- BEST
- };
-
// Returns the value of AnalogOutputMode for which the output signal may retain its full frequency spectrum
// at the sample rate specified by the targetSampleRate argument.
static AnalogOutputMode getBestAnalogOutputMode(double targetSampleRate);
+ // Returns the sample rate supported by the sample rate conversion implementation currently in effect
+ // that is closest to the one specified by the desiredSampleRate argument.
+ static double getSupportedOutputSampleRate(double desiredSampleRate);
+
// Creates a SampleRateConverter instance that converts output signal from the synth to the given sample rate
// with the specified conversion quality.
- SampleRateConverter(Synth &synth, double targetSampleRate, Quality quality);
+ SampleRateConverter(Synth &synth, double targetSampleRate, SamplerateConversionQuality quality);
~SampleRateConverter();
// Fills the provided output buffer with the results of the sample rate conversion.
@@ -70,9 +66,10 @@ public:
private:
const double synthInternalToTargetSampleRateRatio;
+ const bool useSynthDelegate;
void * const srcDelegate;
}; // class SampleRateConverter
} // namespace MT32Emu
-#endif // SAMPLE_RATE_CONVERTER_H
+#endif // MT32EMU_SAMPLE_RATE_CONVERTER_H