aboutsummaryrefslogtreecommitdiff
path: root/audio/softsynth/mt32/Structures.h
diff options
context:
space:
mode:
authorColin Snover2016-11-24 09:24:00 -0600
committerColin Snover2016-11-25 12:14:13 -0600
commitb4dbd6d3c275097b4be964b7da4478ff930cbaa7 (patch)
treebb9039cb088654fc93a7048eae799d53b06f3aa9 /audio/softsynth/mt32/Structures.h
parentb5b5c4f341530c41c73cc0d97e7ddae9cbc1d926 (diff)
downloadscummvm-rg350-b4dbd6d3c275097b4be964b7da4478ff930cbaa7.tar.gz
scummvm-rg350-b4dbd6d3c275097b4be964b7da4478ff930cbaa7.tar.bz2
scummvm-rg350-b4dbd6d3c275097b4be964b7da4478ff930cbaa7.zip
MT32: Update Munt to 2.0.0
This changeset also removes unnecessary direct modifications to Munt code to ease future updates. To update Munt in the future: 1. Replace all source files in the `softsynth/mt32` directory with new files from the upstream `mt32emu/src` directory; 2. Update `config.h` with the correct version number for the new version of Munt; 3. Update `module.mk` to match the list of sources given in `mt32emu/CMakeLists.txt libmt32emu_SOURCES`.
Diffstat (limited to 'audio/softsynth/mt32/Structures.h')
-rw-r--r--audio/softsynth/mt32/Structures.h41
1 files changed, 31 insertions, 10 deletions
diff --git a/audio/softsynth/mt32/Structures.h b/audio/softsynth/mt32/Structures.h
index 4dada3a847..6dcb9c86a9 100644
--- a/audio/softsynth/mt32/Structures.h
+++ b/audio/softsynth/mt32/Structures.h
@@ -1,5 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
- * Copyright (C) 2011, 2012, 2013, 2014 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
+ * Copyright (C) 2011-2016 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
@@ -18,6 +18,9 @@
#ifndef MT32EMU_STRUCTURES_H
#define MT32EMU_STRUCTURES_H
+#include "globals.h"
+#include "Types.h"
+
namespace MT32Emu {
// MT32EMU_MEMADDR() converts from sysex-padded, MT32EMU_SYSEXMEMADDR converts to it
@@ -102,8 +105,8 @@ struct TimbreParam {
Bit8u envTime[5]; // 0-100
Bit8u envLevel[4]; // 0-100 // [3]: SUSTAIN LEVEL
} MT32EMU_ALIGN_PACKED tva;
- } MT32EMU_ALIGN_PACKED partial[4];
-} MT32EMU_ALIGN_PACKED;
+ } MT32EMU_ALIGN_PACKED partial[4]; // struct PartialParam
+} MT32EMU_ALIGN_PACKED; // struct TimbreParam
struct PatchParam {
Bit8u timbreGroup; // TIMBRE GROUP 0-3 (group A, group B, Memory, Rhythm)
@@ -163,7 +166,16 @@ struct MemParams {
Bit8u chanAssign[9]; // MIDI CHANNEL (PART1) 0-16 (1-16,OFF)
Bit8u masterVol; // MASTER VOLUME 0-100
} MT32EMU_ALIGN_PACKED system;
-};
+}; // struct MemParams
+
+struct SoundGroup {
+ Bit8u timbreNumberTableAddrLow;
+ Bit8u timbreNumberTableAddrHigh;
+ Bit8u displayPosition;
+ Bit8u name[9];
+ Bit8u timbreCount;
+ Bit8u pad;
+} MT32EMU_ALIGN_PACKED;
#if defined(_MSC_VER) || defined(__MINGW32__)
#pragma pack(pop)
@@ -171,10 +183,17 @@ struct MemParams {
#pragma pack()
#endif
+struct ControlROMFeatureSet {
+ unsigned int quirkPitchEnvelopeOverflow : 1;
+
+ // Features below don't actually depend on control ROM version, which is used to identify hardware model
+ unsigned int defaultReverbMT32Compatible : 1;
+ unsigned int oldMT32AnalogLPF : 1;
+};
+
struct ControlROMMap {
- Bit16u idPos;
- Bit16u idLen;
- const char *idBytes;
+ const char *shortName;
+ const ControlROMFeatureSet &featureSet;
Bit16u pcmTable; // 4 * pcmCount bytes
Bit16u pcmCount;
Bit16u timbreAMap; // 128 bytes
@@ -194,6 +213,8 @@ struct ControlROMMap {
Bit16u patchMaxTable; // 16 bytes
Bit16u systemMaxTable; // 23 bytes
Bit16u timbreMaxTable; // 72 bytes
+ Bit16u soundGroupsTable; // 14 bytes each entry
+ Bit16u soundGroupsCount;
};
struct ControlROMPCMStruct {
@@ -215,7 +236,7 @@ struct PatchCache {
bool playPartial;
bool PCMPartial;
int pcm;
- char waveform;
+ Bit8u waveform;
Bit32u structureMix;
int structurePosition;
@@ -233,6 +254,6 @@ struct PatchCache {
const TimbreParam::PartialParam *partialParam;
};
-}
+} // namespace MT32Emu
-#endif
+#endif // #ifndef MT32EMU_STRUCTURES_H