mirror of
https://github.com/ZDoom/Raze.git
synced 2025-06-03 02:30:58 +00:00
- converted the 3 new CVARs in the audio code.
This commit is contained in:
parent
e8cf6c3d32
commit
60fc828a89
3 changed files with 18 additions and 31 deletions
|
@ -48,40 +48,11 @@ const char *FX_ErrorString(int const ErrorNumber)
|
|||
return ErrorString;
|
||||
}
|
||||
|
||||
static int osdcmd_cvar_set_audiolib(osdcmdptr_t parm)
|
||||
{
|
||||
int32_t r = osdcmd_cvar_set(parm);
|
||||
|
||||
if (r != OSDCMD_OK) return r;
|
||||
|
||||
if (!Bstrcasecmp(parm->name, "mus_emidicard"))
|
||||
MIDI_Restart();
|
||||
else if (!Bstrcasecmp(parm->name, "mus_al_stereo"))
|
||||
AL_SetStereo(AL_Stereo);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
int FX_Init(int numvoices, int numchannels, int mixrate, void *initdata)
|
||||
{
|
||||
if (FX_Installed)
|
||||
FX_Shutdown();
|
||||
else
|
||||
{
|
||||
static int init;
|
||||
|
||||
static osdcvardata_t cvars_audiolib[] = {
|
||||
{ "mus_emidicard", "force a specific EMIDI instrument set", (void *)&ASS_EMIDICard, CVAR_INT | CVAR_FUNCPTR, -1, 10 },
|
||||
{ "mus_al_stereo", "enable/disable OPL3 stereo mode", (void *)&AL_Stereo, CVAR_BOOL | CVAR_FUNCPTR, 0, 1 },
|
||||
{ "mus_al_additivemode", "enable/disable alternate additive AdLib timbre mode", (void *)&AL_AdditiveMode, CVAR_BOOL, 0, 1 },
|
||||
};
|
||||
|
||||
if (!init++)
|
||||
{
|
||||
for (auto &i : cvars_audiolib)
|
||||
OSD_RegisterCvar(&i, (i.flags & CVAR_FUNCPTR) ? osdcmd_cvar_set_audiolib : osdcmd_cvar_set);
|
||||
}
|
||||
}
|
||||
|
||||
int SoundCard = ASS_AutoDetect;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue