2001-04-24 22:19:42 +00:00
|
|
|
/*
|
2001-08-23 04:01:46 +00:00
|
|
|
QF/plugin/snd_render.h
|
2001-04-24 22:19:42 +00:00
|
|
|
|
2001-08-23 04:01:46 +00:00
|
|
|
Sound Renderer plugin data types
|
2001-04-24 22:19:42 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
*/
|
2001-08-23 04:01:46 +00:00
|
|
|
#ifndef __QF_plugin_snd_render_h_
|
|
|
|
#define __QF_plugin_snd_render_h_
|
2001-04-24 22:19:42 +00:00
|
|
|
|
2012-02-13 12:58:34 +00:00
|
|
|
#include <QF/plugin.h>
|
2001-04-24 22:19:42 +00:00
|
|
|
#include <QF/qtypes.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
All sound plugins must export these functions
|
|
|
|
*/
|
2001-08-30 20:32:27 +00:00
|
|
|
|
|
|
|
struct sfx_s;
|
|
|
|
|
2004-01-19 07:47:41 +00:00
|
|
|
typedef void (*P_S_Init) (void);
|
|
|
|
typedef void (*P_S_Shutdown) (void);
|
|
|
|
typedef void (*P_S_AmbientOff) (void);
|
|
|
|
typedef void (*P_S_AmbientOn) (void);
|
|
|
|
typedef void (*P_S_StartSound) (int entnum, int entchannel, struct sfx_s *sfx, const vec3_t origin, float fvol, float attenuation);
|
|
|
|
typedef void (*P_S_StaticSound) (struct sfx_s *sfx, const vec3_t origin, float vol, float attenuation);
|
|
|
|
typedef void (*P_S_StopSound) (int entnum, int entchannel);
|
|
|
|
typedef struct sfx_s * (*P_S_PrecacheSound) (const char *sample);
|
2012-02-13 04:44:29 +00:00
|
|
|
typedef void (*P_S_Update) (const vec3_t origin, const vec3_t v_forward, const vec3_t v_right, const vec3_t v_up, const byte *ambient_sound_level);
|
2007-03-17 03:10:45 +00:00
|
|
|
typedef void (*P_S_StopAllSounds) (void);
|
2004-01-19 07:47:41 +00:00
|
|
|
typedef void (*P_S_ExtraUpdate) (void);
|
|
|
|
typedef void (*P_S_LocalSound) (const char *s);
|
|
|
|
typedef void (*P_S_BlockSound) (void);
|
|
|
|
typedef void (*P_S_UnblockSound) (void);
|
2004-01-21 02:52:12 +00:00
|
|
|
typedef struct sfx_s *(*P_S_LoadSound) (const char *name);
|
|
|
|
typedef struct channel_s *(*P_S_AllocChannel) (void);
|
2007-03-18 12:54:59 +00:00
|
|
|
typedef void (*P_S_ChannelStop) (struct channel_s *chan);
|
2001-04-24 22:19:42 +00:00
|
|
|
|
2001-08-23 04:01:46 +00:00
|
|
|
typedef struct snd_render_funcs_s {
|
2001-04-24 22:19:42 +00:00
|
|
|
P_S_AmbientOff pS_AmbientOff;
|
|
|
|
P_S_AmbientOn pS_AmbientOn;
|
|
|
|
P_S_StaticSound pS_StaticSound;
|
|
|
|
P_S_StartSound pS_StartSound;
|
|
|
|
P_S_StopSound pS_StopSound;
|
|
|
|
P_S_PrecacheSound pS_PrecacheSound;
|
|
|
|
P_S_Update pS_Update;
|
|
|
|
P_S_StopAllSounds pS_StopAllSounds;
|
|
|
|
P_S_ExtraUpdate pS_ExtraUpdate;
|
|
|
|
P_S_LocalSound pS_LocalSound;
|
2001-07-05 20:18:23 +00:00
|
|
|
P_S_BlockSound pS_BlockSound;
|
|
|
|
P_S_UnblockSound pS_UnblockSound;
|
2004-01-21 02:52:12 +00:00
|
|
|
P_S_LoadSound pS_LoadSound;
|
|
|
|
P_S_AllocChannel pS_AllocChannel;
|
2007-03-18 12:54:59 +00:00
|
|
|
P_S_ChannelStop pS_ChannelStop;
|
2001-08-23 04:01:46 +00:00
|
|
|
} snd_render_funcs_t;
|
2001-04-24 22:19:42 +00:00
|
|
|
|
2001-08-23 04:01:46 +00:00
|
|
|
typedef struct snd_render_data_s {
|
2001-05-19 00:05:35 +00:00
|
|
|
double *host_frametime;
|
|
|
|
int *viewentity;
|
2001-04-24 22:19:42 +00:00
|
|
|
|
2005-06-08 06:35:48 +00:00
|
|
|
unsigned int *soundtime;
|
|
|
|
unsigned int *paintedtime;
|
2003-01-31 19:14:12 +00:00
|
|
|
struct plugin_s *output;
|
2001-08-23 04:01:46 +00:00
|
|
|
} snd_render_data_t;
|
|
|
|
|
|
|
|
#endif // __QF_plugin_snd_render_h_
|