fix the seg on startup with -nosound

This commit is contained in:
Bill Currie 2000-05-18 02:46:05 +00:00
parent 3d1ae7ea7c
commit 116daa40e9

View file

@ -207,52 +207,30 @@ void S_Init (void)
// Con_Printf("\nSound Initialization\n");
if (COM_CheckParm("-nosound"))
return;
if (COM_CheckParm("-simsound"))
fakedma = true;
Cmd_AddCommand("play", S_Play);
Cmd_AddCommand("playvol", S_PlayVol);
Cmd_AddCommand("stopsound", S_StopAllSoundsC);
Cmd_AddCommand("soundlist", S_SoundList);
Cmd_AddCommand("soundinfo", S_SoundInfo_f);
/* Cvar_RegisterVariable(&nosound);
CVAR_FIXME */
nosound = Cvar_Get("nosound", "0", CVAR_NONE, "None");
/* Cvar_RegisterVariable(&volume);
CVAR_FIXME */
volume = Cvar_Get("volume", "0.7", CVAR_ARCHIVE, "None");
/* Cvar_RegisterVariable(&precache);
CVAR_FIXME */
precache = Cvar_Get("precache", "1", CVAR_NONE, "None");
/* Cvar_RegisterVariable(&loadas8bit);
CVAR_FIXME */
loadas8bit = Cvar_Get("loadas8bit", "0", CVAR_NONE, "None");
/* Cvar_RegisterVariable(&bgmvolume);
CVAR_FIXME */
bgmvolume = Cvar_Get("bgmvolume", "1", CVAR_ARCHIVE, "None");
/* Cvar_RegisterVariable(&bgmbuffer);
CVAR_FIXME */
bgmbuffer = Cvar_Get("bgmbuffer", "4096", CVAR_NONE, "None");
/* Cvar_RegisterVariable(&ambient_level);
CVAR_FIXME */
ambient_level = Cvar_Get("ambient_level", "0.3", CVAR_NONE, "None");
/* Cvar_RegisterVariable(&ambient_fade);
CVAR_FIXME */
ambient_fade = Cvar_Get("ambient_fade", "100", CVAR_NONE, "None");
/* Cvar_RegisterVariable(&snd_noextraupdate);
CVAR_FIXME */
snd_noextraupdate = Cvar_Get("snd_noextraupdate", "0", CVAR_NONE, "None");
/* Cvar_RegisterVariable(&snd_show);
CVAR_FIXME */
snd_show = Cvar_Get("snd_show", "0", CVAR_NONE, "None");
/* Cvar_RegisterVariable(&_snd_mixahead);
CVAR_FIXME */
_snd_mixahead = Cvar_Get("_snd_mixahead", "0.1", CVAR_ARCHIVE, "None");
if (COM_CheckParm("-nosound"))
return;
if (COM_CheckParm("-simsound"))
fakedma = true;
if (host_parms.memsize < 0x800000)
{
Cvar_Set (loadas8bit, "1");