mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-11 07:42:18 +00:00
9cc30959e4
thinking :) set fs_pluginpath to point to the right dir, and set snd_plugin to pick a sound plugin. Current issues: - alsa 0.5 won't build properly, dunno why - segfault on exit. I think I know the cause of this, and how to fix it - alsa 0.9, gus, sgi, sun, and win32 havn't been tested
80 lines
2.7 KiB
C
80 lines
2.7 KiB
C
/*
|
|
QF/plugin/sound.h
|
|
|
|
Sound plugin data types
|
|
|
|
Copyright (C) 2001 Jeff Teunissen <deek@quakeforge.net>
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU General Public License
|
|
as published by the Free Software Foundation; either version 2
|
|
of the License, or (at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
See the GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to:
|
|
|
|
Free Software Foundation, Inc.
|
|
59 Temple Place - Suite 330
|
|
Boston, MA 02111-1307, USA
|
|
|
|
$Id$
|
|
*/
|
|
#ifndef __QF_plugin_sound_h_
|
|
#define __QF_plugin_sound_h_
|
|
|
|
#include <QF/qtypes.h>
|
|
#include <QF/sound.h>
|
|
#include <QF/plugin.h>
|
|
|
|
/*
|
|
All sound plugins must export these functions
|
|
*/
|
|
typedef void (QFPLUGIN *P_S_Init) (void);
|
|
typedef void (QFPLUGIN *P_S_Shutdown) (void);
|
|
typedef void (QFPLUGIN *P_S_AmbientOff) (void);
|
|
typedef void (QFPLUGIN *P_S_AmbientOn) (void);
|
|
typedef void (QFPLUGIN *P_S_TouchSound) (char *sample);
|
|
typedef void (QFPLUGIN *P_S_ClearBuffer) (void);
|
|
typedef void (QFPLUGIN *P_S_StartSound) (int entnum, int entchannel, sfx_t *sfx, vec3_t origin, float fvol, float attenuation);
|
|
typedef void (QFPLUGIN *P_S_StaticSound) (sfx_t *sfx, vec3_t origin, float vol, float attenuation);
|
|
typedef void (QFPLUGIN *P_S_StopSound) (int entnum, int entchannel);
|
|
typedef sfx_t * (QFPLUGIN *P_S_PrecacheSound) (char *sample);
|
|
typedef void (QFPLUGIN *P_S_ClearPrecache) (void);
|
|
typedef void (QFPLUGIN *P_S_Update) (vec3_t origin, vec3_t v_forward, vec3_t v_right, vec3_t v_up);
|
|
typedef void (QFPLUGIN *P_S_StopAllSounds) (qboolean clear);
|
|
typedef void (QFPLUGIN *P_S_BeginPrecaching) (void);
|
|
typedef void (QFPLUGIN *P_S_EndPrecaching) (void);
|
|
typedef void (QFPLUGIN *P_S_ExtraUpdate) (void);
|
|
typedef void (QFPLUGIN *P_S_LocalSound) (char *s);
|
|
|
|
typedef struct sound_funcs_s {
|
|
P_S_AmbientOff pS_AmbientOff;
|
|
P_S_AmbientOn pS_AmbientOn;
|
|
P_S_TouchSound pS_TouchSound;
|
|
P_S_ClearBuffer pS_ClearBuffer;
|
|
P_S_StaticSound pS_StaticSound;
|
|
P_S_StartSound pS_StartSound;
|
|
P_S_StopSound pS_StopSound;
|
|
P_S_PrecacheSound pS_PrecacheSound;
|
|
P_S_ClearPrecache pS_ClearPrecache;
|
|
P_S_Update pS_Update;
|
|
P_S_StopAllSounds pS_StopAllSounds;
|
|
P_S_BeginPrecaching pS_BeginPrecaching;
|
|
P_S_EndPrecaching pS_EndPrecaching;
|
|
P_S_ExtraUpdate pS_ExtraUpdate;
|
|
P_S_LocalSound pS_LocalSound;
|
|
} sound_funcs_t;
|
|
|
|
typedef struct sound_data_s {
|
|
struct model_s ***worldmodel;
|
|
double *host_frametime;
|
|
int *viewentity;
|
|
} sound_data_t;
|
|
|
|
#endif // __QF_plugin_sound_h_
|