From 99350cf4f104a2caa2c0327a5aa1af5e727cd2e5 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 15 Oct 2002 17:32:47 +0000 Subject: [PATCH] cleanup some bitrot that caused qf to seg when using the null sound driver --- libs/audio/targets/snd_null.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/libs/audio/targets/snd_null.c b/libs/audio/targets/snd_null.c index 9236f561f..03f68e1ce 100644 --- a/libs/audio/targets/snd_null.c +++ b/libs/audio/targets/snd_null.c @@ -34,9 +34,9 @@ static const char rcsid[] = # include "config.h" #endif -#include "QF/cvar.h" #include "QF/plugin.h" #include "QF/sound.h" +#include "QF/sys.h" static plugin_t plugin_info; static plugin_data_t plugin_info_data; @@ -46,8 +46,15 @@ static general_funcs_t plugin_info_general_funcs; static snd_output_data_t plugin_info_snd_output_data; static snd_output_funcs_t plugin_info_snd_output_funcs; -static void +static qboolean SNDDMA_Init (void) +{ + Sys_Printf ("SNDDMA_Init: null sound driver always fails :)\n"); + return false; +} + +static void +SNDDMA_Init_Cvars (void) { } @@ -97,9 +104,11 @@ PLUGIN_INFO(snd_output, null) (void) { plugin_info_funcs.input = NULL; plugin_info_funcs.snd_output = &plugin_info_snd_output_funcs; - plugin_info_general_funcs.p_Init = SNDDMA_Init; - plugin_info_general_funcs.p_Shutdown = SNDDMA_Shutdown; + plugin_info_general_funcs.p_Init = SNDDMA_Init_Cvars; + plugin_info_general_funcs.p_Shutdown = NULL; + plugin_info_snd_output_funcs.pS_O_Init = SNDDMA_Init; + plugin_info_snd_output_funcs.pS_O_Shutdown = SNDDMA_Shutdown; plugin_info_snd_output_funcs.pS_O_BlockSound = SNDDMA_BlockSound; plugin_info_snd_output_funcs.pS_O_GetDMAPos = SNDDMA_GetDMAPos; plugin_info_snd_output_funcs.pS_O_Submit = SNDDMA_Submit;