DOSBox-X
|
00001 /* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher 00002 * Copyright (C) 2011, 2012, 2013 Dean Beeler, Jerome Fisher, Sergey V. Mikayev 00003 * 00004 * This program is free software: you can redistribute it and/or modify 00005 * it under the terms of the GNU Lesser General Public License as published by 00006 * the Free Software Foundation, either version 2.1 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU Lesser General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public License 00015 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 */ 00017 00018 #ifndef MT32EMU_MT32EMU_H 00019 #define MT32EMU_MT32EMU_H 00020 00021 // Debugging 00022 00023 // 0: Standard debug output is not stamped with the rendered sample count 00024 // 1: Standard debug output is stamped with the rendered sample count 00025 // NOTE: The "samplestamp" corresponds to the end of the last completed rendering run. 00026 // This is important to bear in mind for debug output that occurs during a run. 00027 #define MT32EMU_DEBUG_SAMPLESTAMPS 0 00028 00029 // 0: No debug output for initialisation progress 00030 // 1: Debug output for initialisation progress 00031 #define MT32EMU_MONITOR_INIT 0 00032 00033 // 0: No debug output for MIDI events 00034 // 1: Debug output for weird MIDI events 00035 #define MT32EMU_MONITOR_MIDI 0 00036 00037 // 0: No debug output for note on/off 00038 // 1: Basic debug output for note on/off 00039 // 2: Comprehensive debug output for note on/off 00040 #define MT32EMU_MONITOR_INSTRUMENTS 0 00041 00042 // 0: No debug output for partial allocations 00043 // 1: Show partial stats when an allocation fails 00044 // 2: Show partial stats with every new poly 00045 // 3: Show individual partial allocations/deactivations 00046 #define MT32EMU_MONITOR_PARTIALS 0 00047 00048 // 0: No debug output for sysex 00049 // 1: Basic debug output for sysex 00050 #define MT32EMU_MONITOR_SYSEX 0 00051 00052 // 0: No debug output for sysex writes to the timbre areas 00053 // 1: Debug output with the name and location of newly-written timbres 00054 // 2: Complete dump of timbre parameters for newly-written timbres 00055 #define MT32EMU_MONITOR_TIMBRES 0 00056 00057 // 0: No TVA/TVF-related debug output. 00058 // 1: Shows changes to TVA/TVF target, increment and phase. 00059 #define MT32EMU_MONITOR_TVA 0 00060 #define MT32EMU_MONITOR_TVF 0 00061 00062 // Configuration 00063 // The maximum number of partials playing simultaneously 00064 #define MT32EMU_MAX_PARTIALS 256 00065 // The maximum number of notes playing simultaneously per part. 00066 // No point making it more than MT32EMU_MAX_PARTIALS, since each note needs at least one partial. 00067 #define MT32EMU_MAX_POLY 256 00068 00069 // If non-zero, deletes reverb buffers that are not in use to save memory. 00070 // If zero, keeps reverb buffers for all modes around all the time to avoid allocating/freeing in the critical path. 00071 #define MT32EMU_REDUCE_REVERB_MEMORY 1 00072 00073 // 0: Use legacy Freeverb 00074 // 1: Use Accurate Reverb model aka AReverb 00075 // 2: Use Bit-perfect Boss Reverb model aka BReverb (for developers, not much practical use) 00076 #define MT32EMU_USE_REVERBMODEL 1 00077 00078 // 0: Use refined wave generator based on logarithmic fixed-point computations and LUTs 00079 // 1: Use legacy accurate wave generator based on float computations 00080 #define MT32EMU_ACCURATE_WG 0 00081 00082 namespace MT32Emu 00083 { 00084 // The higher this number, the more memory will be used, but the more samples can be processed in one run - 00085 // various parts of sample generation can be processed more efficiently in a single run. 00086 // A run's maximum length is that given to Synth::render(), so giving a value here higher than render() is ever 00087 // called with will give no gain (but simply waste the memory). 00088 // Note that this value does *not* in any way impose limitations on the length given to render(), and has no effect 00089 // on the generated audio. 00090 // This value must be >= 1. 00091 const unsigned int MAX_SAMPLES_PER_RUN = 4096; 00092 00093 // This determines the amount of memory available for simulating delays. 00094 // If set too low, partials aborted to allow other partials to play will not end gracefully, but will terminate 00095 // abruptly and potentially cause a pop/crackle in the audio output. 00096 // This value must be >= 1. 00097 const unsigned int MAX_PRERENDER_SAMPLES = 1024; 00098 } 00099 00100 #include "Structures.h" 00101 #include "File.h" 00102 #include "FileStream.h" 00103 #include "Tables.h" 00104 #include "Poly.h" 00105 #include "LA32Ramp.h" 00106 #include "LA32WaveGenerator.h" 00107 #include "LegacyWaveGenerator.h" 00108 #include "TVA.h" 00109 #include "TVP.h" 00110 #include "TVF.h" 00111 #include "Partial.h" 00112 #include "Part.h" 00113 #include "ROMInfo.h" 00114 #include "Synth.h" 00115 00116 #endif