Added gain for libADLMIDI and for libOPNMIDI
This commit is contained in:
parent
8954463f0e
commit
798ceddea6
3 changed files with 34 additions and 1 deletions
|
|
@ -90,6 +90,8 @@ EXTERN_CVAR(Float, snd_musicvolume)
|
|||
EXTERN_CVAR(Int, snd_mididevice)
|
||||
EXTERN_CVAR(Float, mod_dumb_mastervolume)
|
||||
EXTERN_CVAR(Float, fluid_gain)
|
||||
EXTERN_CVAR(Float, adl_gain)
|
||||
EXTERN_CVAR(Float, opn_gain)
|
||||
|
||||
|
||||
CVAR(Bool, mus_calcgain, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) // changing this will only take effect for the next song.
|
||||
|
|
|
|||
|
|
@ -114,6 +114,20 @@ CUSTOM_CVAR(Bool, adl_auto_arpeggio, false, CVAR_ARCHIVE | CVAR_VIRTUAL)
|
|||
{
|
||||
FORWARD_BOOL_CVAR(adl_auto_arpeggio);
|
||||
}
|
||||
|
||||
CUSTOM_CVAR(Float, adl_gain, 0.5, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_VIRTUAL)
|
||||
{
|
||||
if (!mus_usereplaygain)
|
||||
{
|
||||
FORWARD_CVAR(adl_gain);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Replay gain will disable the user setting for consistency.
|
||||
float newval;
|
||||
ChangeMusicSetting(zmusic_adl_gain, mus_playing.handle, 1.0f, & newval);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
//==========================================================================
|
||||
//
|
||||
|
|
@ -295,6 +309,20 @@ CUSTOM_CVAR(Bool, opn_auto_arpeggio, false, CVAR_ARCHIVE | CVAR_VIRTUAL)
|
|||
{
|
||||
FORWARD_BOOL_CVAR(adl_auto_arpeggio);
|
||||
}
|
||||
|
||||
CUSTOM_CVAR(Float, opn_gain, 0.5, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_VIRTUAL)
|
||||
{
|
||||
if (!mus_usereplaygain)
|
||||
{
|
||||
FORWARD_CVAR(opn_gain);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Replay gain will disable the user setting for consistency.
|
||||
float newval;
|
||||
ChangeMusicSetting(zmusic_opn_gain, mus_playing.handle, 1.0f, & newval);
|
||||
}
|
||||
}
|
||||
//==========================================================================
|
||||
//
|
||||
// GUS MIDI device
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue