aboutsummaryrefslogtreecommitdiff
path: root/audio/softsynth/mt32/mt32emu.h
diff options
context:
space:
mode:
authorFilippos Karapetis2013-03-02 14:09:39 +0200
committerFilippos Karapetis2013-03-02 14:09:39 +0200
commitf4cc45d367442f850baecd814003ec09790a43b0 (patch)
treebfc904c0e8ced825749fa910696fae1d24fe10ca /audio/softsynth/mt32/mt32emu.h
parent8884c240fc4683975cd76802b600c019ebcb260c (diff)
downloadscummvm-rg350-f4cc45d367442f850baecd814003ec09790a43b0.tar.gz
scummvm-rg350-f4cc45d367442f850baecd814003ec09790a43b0.tar.bz2
scummvm-rg350-f4cc45d367442f850baecd814003ec09790a43b0.zip
MT32: Sync with the latest changes in munt
The major change is the addition of a refined wave generator based on logarithmic fixed-point computations and LUTs
Diffstat (limited to 'audio/softsynth/mt32/mt32emu.h')
-rw-r--r--audio/softsynth/mt32/mt32emu.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/audio/softsynth/mt32/mt32emu.h b/audio/softsynth/mt32/mt32emu.h
index 6812f7bc8a..971a0886d5 100644
--- a/audio/softsynth/mt32/mt32emu.h
+++ b/audio/softsynth/mt32/mt32emu.h
@@ -59,18 +59,6 @@
#define MT32EMU_MONITOR_TVA 0
#define MT32EMU_MONITOR_TVF 0
-// The WG algorithm involves dozens of transcendent maths, e.g. exponents and trigonometry.
-// Unfortunately, the majority of systems perform such computations inefficiently,
-// standard math libs and FPUs make no optimisations for single precision floats,
-// and use no LUTs to speedup computing internal taylor series. Though, there're rare exceptions,
-// and there's a hope it will become common soon.
-// So, this is the crucial point of speed optimisations. We have now eliminated all the transcendent maths
-// within the critical path and use LUTs instead.
-// Besides, since the LA32 chip is assumed to use similar LUTs inside, the overall emulation accuracy should be better.
-// 0: Use LUTs to speedup WG. Most common setting. You can expect about 50% performance boost.
-// 1: Use precise float math. Use this setting to achieve more accurate wave generator. If your system performs better with this setting, it is really notable. :)
-#define MT32EMU_ACCURATE_WG 0
-
// Configuration
// The maximum number of partials playing simultaneously
#define MT32EMU_MAX_PARTIALS 32
@@ -87,6 +75,10 @@
// 2: Use Bit-perfect Boss Reverb model aka BReverb (for developers, not much practical use)
#define MT32EMU_USE_REVERBMODEL 1
+// 0: Use refined wave generator based on logarithmic fixed-point computations and LUTs
+// 1: Use legacy accurate wave generator based on float computations
+#define MT32EMU_ACCURATE_WG 0
+
namespace MT32Emu
{
// The higher this number, the more memory will be used, but the more samples can be processed in one run -
@@ -110,6 +102,8 @@ const unsigned int MAX_PRERENDER_SAMPLES = 1024;
#include "Tables.h"
#include "Poly.h"
#include "LA32Ramp.h"
+#include "LA32WaveGenerator.h"
+#include "LegacyWaveGenerator.h"
#include "TVA.h"
#include "TVP.h"
#include "TVF.h"