mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-13 07:57:51 +00:00
ADL&OPN: More setup: Chips count and Volume model!
Notes: * ADL: The DMX volume model was set as default to unify volumes on all bank. Otherwise, if you will use 'Generic' or 'Win9x', the sound will became too loud than wanted. Each bank has own default volume model which is used when 'Auto' is set. * ADL: 6 chips is optimal to work with default banks * OPN: 8 chips are set to provide 48 polyphony channels. (each OPN2 chip has 6 channels only) * Text files: junk spaces from end of lines are was auto-removed.
This commit is contained in:
parent
892033931e
commit
5a7b53a865
4 changed files with 156 additions and 99 deletions
|
@ -54,6 +54,14 @@ enum
|
||||||
ME_PITCHWHEEL = 0xE0
|
ME_PITCHWHEEL = 0xE0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
CUSTOM_CVAR(Int, adl_chips_count, 6, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
|
{
|
||||||
|
if (currSong != nullptr && currSong->GetDeviceType() == MDEV_ADL)
|
||||||
|
{
|
||||||
|
MIDIDeviceChanged(-1, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CUSTOM_CVAR(Int, adl_bank, 14, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
CUSTOM_CVAR(Int, adl_bank, 14, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
{
|
{
|
||||||
if (currSong != nullptr && currSong->GetDeviceType() == MDEV_ADL)
|
if (currSong != nullptr && currSong->GetDeviceType() == MDEV_ADL)
|
||||||
|
@ -62,6 +70,14 @@ CUSTOM_CVAR(Int, adl_bank, 14, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CUSTOM_CVAR(Int, adl_volume_model, ADLMIDI_VolumeModel_DMX, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
|
{
|
||||||
|
if (currSong != nullptr && currSong->GetDeviceType() == MDEV_ADL)
|
||||||
|
{
|
||||||
|
MIDIDeviceChanged(-1, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
// ADLMIDIDevice Constructor
|
// ADLMIDIDevice Constructor
|
||||||
|
@ -74,7 +90,9 @@ ADLMIDIDevice::ADLMIDIDevice(const char *args)
|
||||||
Renderer = adl_init(44100); // todo: make it configurable
|
Renderer = adl_init(44100); // todo: make it configurable
|
||||||
if (Renderer != nullptr)
|
if (Renderer != nullptr)
|
||||||
{
|
{
|
||||||
adl_setBank(Renderer, 14);
|
adl_setBank(Renderer, (int)adl_bank);
|
||||||
|
adl_setNumChips(Renderer, (int)adl_chips_count);
|
||||||
|
adl_setVolumeRangeModel(Renderer, (int)adl_volume_model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,6 +55,14 @@ enum
|
||||||
ME_PITCHWHEEL = 0xE0
|
ME_PITCHWHEEL = 0xE0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
CUSTOM_CVAR(Int, opn_chips_count, 8, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
|
{
|
||||||
|
if (currSong != nullptr && currSong->GetDeviceType() == MDEV_OPN)
|
||||||
|
{
|
||||||
|
MIDIDeviceChanged(-1, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
// OPNMIDIDevice Constructor
|
// OPNMIDIDevice Constructor
|
||||||
|
@ -73,7 +81,8 @@ OPNMIDIDevice::OPNMIDIDevice(const char *args)
|
||||||
I_Error("No OPN bank found");
|
I_Error("No OPN bank found");
|
||||||
}
|
}
|
||||||
FMemLump data = Wads.ReadLump(lump);
|
FMemLump data = Wads.ReadLump(lump);
|
||||||
opn2_openBankData(Renderer, data.GetMem(), data.GetSize());
|
opn2_openBankData(Renderer, data.GetMem(), (long)data.GetSize());
|
||||||
|
opn2_setNumChips(Renderer, opn_chips_count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2184,6 +2184,17 @@ ADVSNDMNU_FREEVERB = "Freeverb";
|
||||||
ADVSNDMNU_GLOBAL_FREEVERB = "Global Freeverb";
|
ADVSNDMNU_GLOBAL_FREEVERB = "Global Freeverb";
|
||||||
ADVSNDMNU_ADVRESAMPLING = "Advanced Resampling";
|
ADVSNDMNU_ADVRESAMPLING = "Advanced Resampling";
|
||||||
ADVSNDMNU_OPLBANK = "OPL Bank";
|
ADVSNDMNU_OPLBANK = "OPL Bank";
|
||||||
|
ADVSNDMNU_ADLNUMCHIPS = "Number of emulated OPL chips";
|
||||||
|
ADVSNDMNU_VLMODEL = "Volume model";
|
||||||
|
ADVSNDMNU_OPNNUMCHIPS = "Number of emulated OPN chips";
|
||||||
|
|
||||||
|
// ADLMIDI's volume models
|
||||||
|
ADLVLMODEL_AUTO = "Auto (Use setup of bank)";
|
||||||
|
ADLVLMODEL_GENERIC = "Generic";
|
||||||
|
ADLVLMODEL_NATIVE = "OPL Native";
|
||||||
|
ADLVLMODEL_DMX = "DMX";
|
||||||
|
ADLVLMODEL_APOGEE = "Apogee";
|
||||||
|
ADLVLMODEL_WIN9X = "Win9X-like";
|
||||||
|
|
||||||
// Module Replayer Options
|
// Module Replayer Options
|
||||||
MODMNU_TITLE = "MODULE REPLAYER OPTIONS";
|
MODMNU_TITLE = "MODULE REPLAYER OPTIONS";
|
||||||
|
|
|
@ -1765,6 +1765,7 @@ OptionMenu ModReplayerOptions protected
|
||||||
Submenu "$ADVSNDMNU_WILDMIDI", "WildMidiOptions", 0, 1
|
Submenu "$ADVSNDMNU_WILDMIDI", "WildMidiOptions", 0, 1
|
||||||
Submenu "$ADVSNDMNU_OPLSYNTHESIS", "OPLOptions", 0, 1
|
Submenu "$ADVSNDMNU_OPLSYNTHESIS", "OPLOptions", 0, 1
|
||||||
Submenu "$ADVSNDMNU_ADLMIDI", "ADLOptions", 0, 1
|
Submenu "$ADVSNDMNU_ADLMIDI", "ADLOptions", 0, 1
|
||||||
|
Submenu "$ADVSNDMNU_OPNMIDI", "OPNOptions", 0, 1
|
||||||
}
|
}
|
||||||
|
|
||||||
OptionMenu FluidsynthOptions protected
|
OptionMenu FluidsynthOptions protected
|
||||||
|
@ -1811,12 +1812,30 @@ OptionMenu ModReplayerOptions protected
|
||||||
Option "$ADVSNDMNU_OPLCORES", "opl_core", "OplCores"
|
Option "$ADVSNDMNU_OPLCORES", "opl_core", "OplCores"
|
||||||
Slider "$ADVSNDMNU_OPLNUMCHIPS", "opl_numchips", 1, 8, 1, 0
|
Slider "$ADVSNDMNU_OPLNUMCHIPS", "opl_numchips", 1, 8, 1, 0
|
||||||
Option "$ADVSNDMNU_OPLFULLPAN", "opl_fullpan", "OnOff"
|
Option "$ADVSNDMNU_OPLFULLPAN", "opl_fullpan", "OnOff"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OptionValue AdlVolumeModels
|
||||||
|
{
|
||||||
|
0, "$ADLVLMODEL_AUTO"
|
||||||
|
1, "$ADLVLMODEL_GENERIC"
|
||||||
|
2, "$ADLVLMODEL_NATIVE"
|
||||||
|
3, "$ADLVLMODEL_DMX"
|
||||||
|
4, "$ADLVLMODEL_APOGEE"
|
||||||
|
5, "$ADLVLMODEL_WIN9X"
|
||||||
|
}
|
||||||
|
|
||||||
OptionMenu ADLOptions protected
|
OptionMenu ADLOptions protected
|
||||||
{
|
{
|
||||||
Title "$ADVSNDMNU_ADLMIDI"
|
Title "$ADVSNDMNU_ADLMIDI"
|
||||||
LabeledSubmenu "$ADVSNDMNU_OPLBANK", "adl_bank", "ADLBankMenu"
|
LabeledSubmenu "$ADVSNDMNU_OPLBANK", "adl_bank", "ADLBankMenu"
|
||||||
|
Slider "$ADVSNDMNU_ADLNUMCHIPS", "adl_chips_count", 1, 32, 1, 0
|
||||||
|
Option "$ADVSNDMNU_VLMODEL", "adl_volume_model", "AdlVolumeModels"
|
||||||
|
}
|
||||||
|
|
||||||
|
OptionMenu OPNOptions protected
|
||||||
|
{
|
||||||
|
Title "$ADVSNDMNU_OPNMIDI"
|
||||||
|
Slider "$ADVSNDMNU_OPNNUMCHIPS", "opn_chips_count", 1, 32, 1, 0
|
||||||
}
|
}
|
||||||
|
|
||||||
/*=======================================
|
/*=======================================
|
||||||
|
|
Loading…
Reference in a new issue