Merge branch 'master' of git@github.com:coelckers/gzdoom.git

# Conflicts:
#	src/sound/adlmidi/adlmidi.cpp
This commit is contained in:
Vitaly Novichkov 2018-03-24 23:51:36 +03:00
commit 5acffa693f
5 changed files with 135 additions and 51 deletions

View file

@ -652,6 +652,9 @@ add_definitions(-DOPNMIDI_USE_LEGACY_EMULATOR)
add_definitions(-DADLMIDI_DISABLE_MUS_SUPPORT -DADLMIDI_DISABLE_XMI_SUPPORT -DADLMIDI_DISABLE_MIDI_SEQUENCER) add_definitions(-DADLMIDI_DISABLE_MUS_SUPPORT -DADLMIDI_DISABLE_XMI_SUPPORT -DADLMIDI_DISABLE_MIDI_SEQUENCER)
add_definitions(-DOPNMIDI_DISABLE_MUS_SUPPORT -DOPNMIDI_DISABLE_XMI_SUPPORT -DOPNMIDI_DISABLE_MIDI_SEQUENCER) add_definitions(-DOPNMIDI_DISABLE_MUS_SUPPORT -DOPNMIDI_DISABLE_XMI_SUPPORT -DOPNMIDI_DISABLE_MIDI_SEQUENCER)
# Disable ADLMIDI's MIDI Sequencer, MUS and XMI converters
add_definitions(-DADLMIDI_DISABLE_MUS_SUPPORT -DADLMIDI_DISABLE_XMI_SUPPORT -DADLMIDI_DISABLE_MIDI_SEQUENCER)
# Project files should be aware of the header files. We can GLOB these since # Project files should be aware of the header files. We can GLOB these since
# there's generally a new cpp for every header so this file will get changed # there's generally a new cpp for every header so this file will get changed
if( WIN32 ) if( WIN32 )

View file

@ -1381,6 +1381,8 @@ static void InitCrosshairsList()
// Initialize the music configuration submenus // Initialize the music configuration submenus
// //
//============================================================================= //=============================================================================
extern const char* const banknames[74];
static void InitMusicMenus() static void InitMusicMenus()
{ {
DMenuDescriptor **advmenu = MenuDescriptors.CheckKey("AdvSoundOptions"); DMenuDescriptor **advmenu = MenuDescriptors.CheckKey("AdvSoundOptions");
@ -1418,6 +1420,21 @@ static void InitMusicMenus()
} }
} }
} }
DMenuDescriptor **menu = MenuDescriptors.CheckKey("ADLBankMenu");
if (menu != nullptr)
{
if (soundfonts.Size() > 0)
{
for(int i=0;i<74;i++)
{
auto it = CreateOptionMenuItemCommand(banknames[i], FStringf("adl_bank %d", i), true);
static_cast<DOptionMenuDescriptor*>(*menu)->mItems.Push(it);
i++;
}
}
}
} }
//============================================================================= //=============================================================================

View file

@ -9002,7 +9002,7 @@ int maxAdlBanks()
const char* const banknames[74] = const char* const banknames[74] =
{ {
"AIL (Star Control 3, Albion, Empire 2, Sensible Soccer, Settlers 2, many others)", "AIL (Star Control 3, Albion, Empire 2, many others)",
"Bisqwit (selection of 4op and 2op)", "Bisqwit (selection of 4op and 2op)",
"HMI (Descent, Asterix)", "HMI (Descent, Asterix)",
"HMI (Descent:: Int)", "HMI (Descent:: Int)",
@ -9016,47 +9016,47 @@ const char* const banknames[74] =
"HMI (Aces of the Deep)", "HMI (Aces of the Deep)",
"HMI (Earthsiege)", "HMI (Earthsiege)",
"HMI (Anvil of Dawn)", "HMI (Anvil of Dawn)",
"DMX (Doom :: partially pseudo 4op)", "DMX (Doom)",
"DMX (Hexen, Heretic :: partially pseudo 4op)", "DMX (Hexen, Heretic)",
"DMX (MUS Play :: partially pseudo 4op)", "DMX (MUS Play)",
"AIL (Discworld, Grandest Fleet, Pocahontas, Slob Zone 3d, Ultima 4, Zorro)", "AIL (Discworld, Grandest Fleet)",
"AIL (Warcraft 2)", "AIL (Warcraft 2)",
"AIL (Syndicate)", "AIL (Syndicate)",
"AIL (Guilty, Orion Conspiracy, Terra Nova Strike Force Centauri :: 4op)", "AIL (Guilty, Orion Conspiracy)",
"AIL (Magic Carpet 2)", "AIL (Magic Carpet 2)",
"AIL (Nemesis)", "AIL (Nemesis)",
"AIL (Jagged Alliance)", "AIL (Jagged Alliance)",
"AIL (When Two Worlds War :: 4op, MISSING INSTRUMENTS)", "AIL (When Two Worlds War)",
"AIL (Bards Tale Construction :: MISSING INSTRUMENTS)", "AIL (Bards Tale Construction)",
"AIL (Return to Zork)", "AIL (Return to Zork)",
"AIL (Theme Hospital)", "AIL (Theme Hospital)",
"AIL (National Hockey League PA)", "AIL (National Hockey League PA)",
"AIL (Inherit The Earth)", "AIL (Inherit The Earth)",
"AIL (Inherit The Earth, file two)", "AIL (Inherit The Earth, file two)",
"AIL (Little Big Adventure :: 4op)", "AIL (Little Big Adventure)",
"AIL (Wreckin Crew)", "AIL (Wreckin Crew)",
"AIL (Death Gate)", "AIL (Death Gate)",
"AIL (FIFA International Soccer)", "AIL (FIFA International Soccer)",
"AIL (Starship Invasion)", "AIL (Starship Invasion)",
"AIL (Super Street Fighter 2 :: 4op)", "AIL (Super Street Fighter 2)",
"AIL (Lords of the Realm :: MISSING INSTRUMENTS)", "AIL (Lords of the Realm)",
"AIL (SimFarm, SimHealth :: 4op)", "AIL (SimFarm, SimHealth)",
"AIL (SimFarm, Settlers, Serf City)", "AIL (SimFarm, Settlers, Serf City)",
"AIL (Caesar 2 :: partially 4op, MISSING INSTRUMENTS)", "AIL (Caesar 2, MISSING INSTRUMENTS)",
"AIL (Syndicate Wars)", "AIL (Syndicate Wars)",
"AIL (Bubble Bobble Feat. Rainbow Islands, Z)", "AIL (Bubble Bobble Feat. Rainbow Islands, Z)",
"AIL (Warcraft)", "AIL (Warcraft)",
"AIL (Terra Nova Strike Force Centuri :: partially 4op)", "AIL (Terra Nova Strike Force Centuri)",
"AIL (System Shock :: partially 4op)", "AIL (System Shock)",
"AIL (Advanced Civilization)", "AIL (Advanced Civilization)",
"AIL (Battle Chess 4000 :: partially 4op, melodic only)", "AIL (Battle Chess 4000, melodic only)",
"AIL (Ultimate Soccer Manager :: partially 4op)", "AIL (Ultimate Soccer Manager)",
"AIL (Air Bucks, Blue And The Gray, America Invades, Terminator 2029)", "AIL (Air Bucks, Blue And The Gray)",
"AIL (Ultima Underworld 2)", "AIL (Ultima Underworld 2)",
"AIL (Kasparov's Gambit)", "AIL (Kasparov's Gambit)",
"AIL (High Seas Trader :: MISSING INSTRUMENTS)", "AIL (High Seas Trader)",
"AIL (Master of Magic, Master of Orion 2 :: 4op, std percussion)", "AIL (Master of Magic, std percussion)",
"AIL (Master of Magic, Master of Orion 2 :: 4op, orchestral percussion)", "AIL (Master of Magic, orchestral percussion)",
"SB (Action Soccer)", "SB (Action Soccer)",
"SB (3d Cyberpuck :: melodic only)", "SB (3d Cyberpuck :: melodic only)",
"SB (Simon the Sorcerer :: melodic only)", "SB (Simon the Sorcerer :: melodic only)",

View file

@ -2143,6 +2143,7 @@ SNDMNU_OPENAL = "OpenAL options";
SNDMNU_RESTART = "Restart sound"; SNDMNU_RESTART = "Restart sound";
SNDMNU_ADVANCED = "Advanced options"; SNDMNU_ADVANCED = "Advanced options";
SNDMNU_MODREPLAYER = "Module replayer options"; SNDMNU_MODREPLAYER = "Module replayer options";
SNDMNU_MIDIPLAYER = "Midi player options";
// OpenAL Options // OpenAL Options
OPENALMNU_TITLE = "OPENAL OPTIONS"; OPENALMNU_TITLE = "OPENAL OPTIONS";
@ -2167,14 +2168,22 @@ ADVSNDMNU_FLUIDSYNTH = "FluidSynth";
ADVSNDMNU_FLUIDPATCHSET = "Patch set"; ADVSNDMNU_FLUIDPATCHSET = "Patch set";
ADVSNDMNU_FLUIDGAIN = "Gain"; ADVSNDMNU_FLUIDGAIN = "Gain";
ADVSNDMNU_REVERB = "Reverb"; ADVSNDMNU_REVERB = "Reverb";
ADVSNDMNU_REVERB_LEVEL = "Reverb Level";
ADVSNDMNU_CHORUS = "Chorus"; ADVSNDMNU_CHORUS = "Chorus";
ADVSNDMNU_TIMIDITY = "Timidity++"; ADVSNDMNU_TIMIDITY = "Timidity++";
ADVSNDMNU_ADLMIDI = "ADLMidi";
ADVSNDMNU_OPNMIDI = "OPNMidi";
ADVSNDMNU_TIMIDITYEXE = "Path for executable"; ADVSNDMNU_TIMIDITYEXE = "Path for executable";
ADVSNDMNU_TIMIDITYCONFIG = "Timidity config file"; ADVSNDMNU_TIMIDITYCONFIG = "Timidity config file";
ADVSNDMNU_TIMIDITYVOLUME = "Relative volume"; ADVSNDMNU_TIMIDITYVOLUME = "Relative volume";
ADVSNDMNU_WILDMIDI = "WildMidi"; ADVSNDMNU_WILDMIDI = "WildMidi";
ADVSNDMNU_WILDMIDICONFIG = "WildMidi config file"; ADVSNDMNU_WILDMIDICONFIG = "WildMidi config file";
ADVSNDMNU_SELCONFIG = "Select configuration"; ADVSNDMNU_SELCONFIG = "Select configuration";
ADVSNDMNU_GLOBAL = "Global";
ADVSNDMNU_FREEVERB = "Freeverb";
ADVSNDMNU_GLOBAL_FREEVERB = "Global Freeverb";
ADVSNDMNU_ADVRESAMPLING = "Advanced Resampling";
ADVSNDMNU_OPLBANK = "OPL Bank";
// Module Replayer Options // Module Replayer Options
MODMNU_TITLE = "MODULE REPLAYER OPTIONS"; MODMNU_TITLE = "MODULE REPLAYER OPTIONS";

View file

@ -1630,6 +1630,7 @@ OptionMenu SoundOptions protected
StaticText " " StaticText " "
Submenu "$SNDMNU_ADVANCED", "AdvSoundOptions" Submenu "$SNDMNU_ADVANCED", "AdvSoundOptions"
Submenu "$SNDMNU_MIDIPLAYER", "MidiPlayerOptions"
Submenu "$SNDMNU_MODREPLAYER", "ModReplayerOptions" Submenu "$SNDMNU_MODREPLAYER", "ModReplayerOptions"
StaticText " " StaticText " "
Submenu "$OPTMNU_REVERB", "ReverbEdit" Submenu "$OPTMNU_REVERB", "ReverbEdit"
@ -1664,36 +1665,6 @@ OptionMenu AdvSoundOptions protected
Title "$ADVSNDMNU_TITLE" Title "$ADVSNDMNU_TITLE"
Option "$ADVSNDMNU_SAMPLERATE", "snd_samplerate", "SampleRates" Option "$ADVSNDMNU_SAMPLERATE", "snd_samplerate", "SampleRates"
Option "$ADVSNDMNU_HRTF", "snd_hrtf", "AutoOffOn" Option "$ADVSNDMNU_HRTF", "snd_hrtf", "AutoOffOn"
StaticText " "
StaticText "$ADVSNDMNU_OPLSYNTHESIS", 1
Slider "$ADVSNDMNU_OPLNUMCHIPS", "opl_numchips", 1, 8, 1, 0
Option "$ADVSNDMNU_OPLFULLPAN", "opl_fullpan", "OnOff"
Option "$ADVSNDMNU_OPLCORES", "opl_core", "OplCores"
StaticText " "
StaticText "$ADVSNDMNU_GUSEMULATION", 1
LabeledSubMenu "$ADVSNDMNU_SELCONFIG", "midi_config", "GusConfigMenu"
Slider "$ADVSNDMNU_MIDIVOICES", "midi_voices", 16, 256, 4, 0
Option "$ADVSNDMNU_DMXGUS", "midi_dmxgus", "OnOff"
Option "$ADVSNDMNU_GUSMEMSIZE", "gus_memsize", "GusMemory"
StaticText " "
StaticText "$ADVSNDMNU_FLUIDSYNTH", 1
LabeledSubMenu "$ADVSNDMNU_SELCONFIG", "fluid_patchset", "FluidPatchsetMenu"
Slider "$ADVSNDMNU_FLUIDGAIN", "fluid_gain", 0, 10, 0.5, 1
Option "$ADVSNDMNU_REVERB", "fluid_reverb", "OnOff"
Option "$ADVSNDMNU_CHORUS", "fluid_chorus", "OnOff"
Slider "$ADVSNDMNU_MIDIVOICES", "fluid_voices", 16, 4096, 16, 0
// Leaving out the more advanced stuff for now.
StaticText " "
StaticText "$ADVSNDMNU_TIMIDITY", 1
LabeledSubMenu "$ADVSNDMNU_SELCONFIG", "timidity_config", "TimidityConfigMenu"
// This one needs reworking
//Option "$ADVSNDMNU_REVERB", "timidity_reverb", "OnOff"
Option "$ADVSNDMNU_CHORUS", "timidity_chorus", "OnOff"
StaticText " "
StaticText "$ADVSNDMNU_WILDMIDI", 1
LabeledSubMenu "$ADVSNDMNU_SELCONFIG", "wildmidi_config", "WildMidiConfigMenu"
Option "$ADVSNDMNU_REVERB", "wildmidi_reverb", "OnOff"
} }
OptionMenu GusConfigMenu protected OptionMenu GusConfigMenu protected
@ -1716,6 +1687,11 @@ OptionMenu FluidPatchsetMenu protected
Title "$ADVSNDMNU_SELCONFIG" Title "$ADVSNDMNU_SELCONFIG"
} }
OptionMenu ADLBankMenu protected
{
Title "$ADVSNDMNU_OPLBANK"
}
/*======================================= /*=======================================
* *
* Module Replayer Options Menu * Module Replayer Options Menu
@ -1750,6 +1726,7 @@ OptionValue ModVolumeRamps
} }
OptionMenu ModReplayerOptions protected OptionMenu ModReplayerOptions protected
{ {
Title "$MODMNU_TITLE" Title "$MODMNU_TITLE"
@ -1764,6 +1741,84 @@ OptionMenu ModReplayerOptions protected
// the foo_dumb preferences in foobar2000. // the foo_dumb preferences in foobar2000.
} }
/*=======================================
*
* MIDI player
*
*=======================================*/
OptionValue TimidityReverb
{
0, "$OPTVAL_OFF"
1, "$OPTVAL_STANDARD"
2, "$ADVSNDMNU_GLOBAL"
3, "$ADVSNDMNU_FREEVERB"
4, "$ADVSNDMNU_GLOBAL_FREEVERB"
}
OptionMenu MidiPlayerOptions protected
{
Title "$SNDMNU_MIDIPLAYER"
Submenu "$ADVSNDMNU_FLUIDSYNTH", "FluidsynthOptions", 0, 1
Submenu "$ADVSNDMNU_TIMIDITY", "TimidityOptions", 0, 1
Submenu "$ADVSNDMNU_GUSEMULATION", "GUSOptions", 0, 1
Submenu "$ADVSNDMNU_WILDMIDI", "WildMidiOptions", 0, 1
Submenu "$ADVSNDMNU_OPLSYNTHESIS", "OPLOptions", 0, 1
Submenu "$ADVSNDMNU_ADLMIDI", "ADLOptions", 0, 1
}
OptionMenu FluidsynthOptions protected
{
Title "$ADVSNDMNU_FLUIDSYNTH"
LabeledSubMenu "$ADVSNDMNU_SELCONFIG", "fluid_patchset", "FluidPatchsetMenu"
Slider "$ADVSNDMNU_FLUIDGAIN", "fluid_gain", 0, 10, 0.5, 1
Option "$ADVSNDMNU_REVERB", "fluid_reverb", "OnOff"
Option "$ADVSNDMNU_CHORUS", "fluid_chorus", "OnOff"
Slider "$ADVSNDMNU_MIDIVOICES", "fluid_voices", 16, 4096, 16, 0
// other CVARs need to be revieved for usefulness
}
OptionMenu TimidityOptions protected
{
Title "$ADVSNDMNU_TIMIDITY"
LabeledSubMenu "$ADVSNDMNU_SELCONFIG", "timidity_config", "TimidityConfigMenu"
Option "$ADVSNDMNU_REVERB", "timidity_reverb", "TimidityReverb"
Slider "$ADVSNDMNU_REVERB_LEVEL", "timidity_reverb_level", 9, 127, 1, 0
Option "$ADVSNDMNU_CHORUS", "timidity_chorus", "OnOff"
// other CVARs need to be revieved for usefulness
}
OptionMenu GUSOptions protected
{
Title "$ADVSNDMNU_GUSEMULATION"
LabeledSubMenu "$ADVSNDMNU_SELCONFIG", "midi_config", "GusConfigMenu"
Slider "$ADVSNDMNU_MIDIVOICES", "midi_voices", 16, 256, 4, 0
Option "$ADVSNDMNU_DMXGUS", "midi_dmxgus", "OnOff"
Option "$ADVSNDMNU_GUSMEMSIZE", "gus_memsize", "GusMemory"
}
OptionMenu WildMidiOptions protected
{
Title "$ADVSNDMNU_WILDMIDI"
LabeledSubMenu "$ADVSNDMNU_SELCONFIG", "wildmidi_config", "WildMidiConfigMenu"
Option "$ADVSNDMNU_REVERB", "wildmidi_reverb", "OnOff"
Option "$ADVSNDMNU_ADVRESAMPLING", "wildmidi_enhanced_resampling", "OnOff"
}
OptionMenu OPLOptions protected
{
Title "$ADVSNDMNU_OPLSYNTHESIS"
Option "$ADVSNDMNU_OPLCORES", "opl_core", "OplCores"
Slider "$ADVSNDMNU_OPLNUMCHIPS", "opl_numchips", 1, 8, 1, 0
Option "$ADVSNDMNU_OPLFULLPAN", "opl_fullpan", "OnOff"
}
OptionMenu ADLOptions protected
{
Title "$ADVSNDMNU_ADLMIDI"
LabeledSubmenu "$ADVSNDMNU_OPLBANK", "adl_bank", "ADLBankMenu"
}
/*======================================= /*=======================================
* *
* Change Renderer Menu * Change Renderer Menu