- small adjustments

This commit is contained in:
Christoph Oelckers 2019-10-24 20:36:18 +02:00
parent 8730ce552b
commit 9648c026a9
4 changed files with 4 additions and 3 deletions

View file

@ -1835,7 +1835,7 @@ void SetSound(CGameMenuItemChain *pItem)
UNREFERENCED_PARAMETER(pItem);
snd_mixrate = nSoundRateValues[itemOptionsSoundSampleRate.m_nFocus];
snd_numvoices = itemOptionsSoundNumVoices.nValue;
MusicDevice = nMusicDeviceValues[itemOptionsSoundMusicDevice.m_nFocus];
mus_device = nMusicDeviceValues[itemOptionsSoundMusicDevice.m_nFocus];
sfxTerm();
sndTerm();

View file

@ -154,7 +154,7 @@ CUSTOM_CVARD(Int, mus_volume, 255, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "controls mus
if (self > 255) self = 255;
}
int MusicDevice;
int MusicDevice = 1;
CUSTOM_CVARD(Int, mus_device, 1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "selects music device")
{
if (self < 0) self = 0;

View file

@ -48,6 +48,7 @@ EXTERN_CVAR(Int, snd_numchannels)
EXTERN_CVAR(Int, snd_numvoices)
EXTERN_CVAR(Int, snd_speech)
EXTERN_CVAR(Int, mus_volume)
EXTERN_CVAR(Int, mus_device)
extern int MusicDevice;
EXTERN_CVAR(Int, hud_layout)

View file

@ -3237,7 +3237,7 @@ static void Menu_EntryLinkActivate(MenuEntry_t *entry)
{
snd_mixrate = soundrate;
snd_numvoices = soundvoices;
MusicDevice = musicdevice;
mus_device = musicdevice;
S_SoundShutdown();
S_MusicShutdown();