diff options
Diffstat (limited to 'audio/softsynth/mt32/Tables.h')
-rw-r--r-- | audio/softsynth/mt32/Tables.h | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/audio/softsynth/mt32/Tables.h b/audio/softsynth/mt32/Tables.h index a2b5ff5d56..8b4580df0e 100644 --- a/audio/softsynth/mt32/Tables.h +++ b/audio/softsynth/mt32/Tables.h @@ -1,5 +1,5 @@ /* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher - * Copyright (C) 2011 Dean Beeler, Jerome Fisher, Sergey V. Mikayev + * Copyright (C) 2011, 2012, 2013 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,14 +20,23 @@ namespace MT32Emu { +// Sample rate to use in mixing. With the progress of development, we've found way too many thing dependent. +// In order to achieve further advance in emulation accuracy, sample rate made fixed throughout the emulator. +// The output from the synth is supposed to be resampled to convert the sample rate. +const unsigned int SAMPLE_RATE = 32000; + const int MIDDLEC = 60; class Synth; class Tables { - bool initialised; +private: + Tables(); + Tables(Tables &); public: + static const Tables &getInstance(); + // Constant LUTs // CONFIRMED: This is used to convert several parameters to amp-modifying values in the TVA envelope: @@ -47,16 +56,10 @@ public: // CONFIRMED: Bit8u pulseWidth100To255[101]; - float pulseLenFactor[128]; - float pitchToFreq[65536]; - float cutoffToCosineLen[1024]; - float cutoffToFilterAmp[1024]; - float resAmpMax[32]; - float resAmpFadeFactor[8]; - float sinf10[5120]; + Bit16u exp9[512]; + Bit16u logsin9[512]; - Tables(); - void init(); + const Bit8u *resAmpDecayFactor; }; } |