diff --git a/libs/audio/targets/snd_win.c b/libs/audio/targets/snd_win.c index 9850750ca..5901a139a 100644 --- a/libs/audio/targets/snd_win.c +++ b/libs/audio/targets/snd_win.c @@ -90,9 +90,17 @@ static HINSTANCE hInstDS; static sndinitstat SNDDMA_InitDirect (void); static qboolean SNDDMA_InitWav (void); +static plugin_t plugin_info; +static plugin_data_t plugin_info_data; +static plugin_funcs_t plugin_info_funcs; +static general_data_t plugin_info_general_data; +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; + void -S_BlockSound (void) +SNDDMA_BlockSound (void) { // DirectSound takes care of blocking itself if (snd_iswave) @@ -101,7 +109,7 @@ S_BlockSound (void) } void -S_UnblockSound (void) +SNDDMA_UnblockSound (void) { // DirectSound takes care of blocking itself if (snd_iswave) @@ -168,7 +176,8 @@ FreeSound (void) Direct-Sound support */ -static sndinitstat SNDDMA_InitDirect (void) +static sndinitstat +SNDDMA_InitDirect (void) { int reps; DSBUFFERDESC dsbuf; @@ -701,3 +710,37 @@ DSOUND_Restore (void) return; } + +plugin_t * +snd_output_win_PluginInfo (void) { + plugin_info.type = qfp_snd_output; + plugin_info.api_version = QFPLUGIN_VERSION; + plugin_info.plugin_version = "0.1"; + plugin_info.description = "Windows digital output"; + plugin_info.copyright = "Copyright (C) 1996-1997 id Software, Inc.\n" + "Copyright (C) 1999,2000,2001 contributors of the QuakeForge " + "project\n" + "Please see the file \"AUTHORS\" for a list of contributors"; + plugin_info.functions = &plugin_info_funcs; + plugin_info.data = &plugin_info_data; + + plugin_info_data.general = &plugin_info_general_data; + plugin_info_data.input = NULL; + plugin_info_data.snd_output = &plugin_info_snd_output_data; + + plugin_info_funcs.general = &plugin_info_general_funcs; + plugin_info_funcs.input = NULL; + plugin_info_funcs.snd_output = &plugin_info_snd_output_funcs; + + 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_GetDMAPos = SNDDMA_GetDMAPos; + plugin_info_snd_output_funcs.pS_O_Submit = SNDDMA_Submit; + plugin_info_snd_output_funcs.pS_O_BlockSound = SNDDMA_BlockSound; + plugin_info_snd_output_funcs.pS_O_UnblockSound = SNDDMA_UnblockSound; + + return &plugin_info; +} +