move the handling of -nosound out of the plugin so it can control loading of the plugin

This commit is contained in:
Bill Currie 2007-03-10 07:22:32 +00:00 committed by Jeff Teunissen
parent d8f6d8a5fb
commit 17875bee39
2 changed files with 3 additions and 6 deletions

View file

@ -55,8 +55,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include "snd_render.h"
// Internal sound data & structures ===========================================
volatile dma_t *snd_shm = 0;
unsigned int snd_paintedtime; // sample PAIRS
@ -942,9 +940,6 @@ s_init (void)
snd_volumesep = Cvar_Get ("snd_volumesep", "1.0", CVAR_ARCHIVE, NULL,
"max stereo volume separation. 1.0 is max");
if (COM_CheckParm ("-nosound"))
return;
if (COM_CheckParm ("-simsound"))
fakedma = true;
@ -993,7 +988,6 @@ s_init (void)
QFS_GamedirCallback (s_gamedir);
}
// Shutdown sound engine ======================================================
static void
s_shutdown (void)
{

View file

@ -59,6 +59,9 @@ static plugin_list_t snd_render_list[] = {
void
S_Init (struct model_s **worldmodel, int *viewentity, double *host_frametime)
{
if (COM_CheckParm ("-nosound"))
return;
if (!*snd_output->string || !*snd_render->string) {
Sys_Printf ("Not loading sound due to no renderer/output\n");
return;