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
|
|
|
|
|
|
|
|
*/
|
2021-06-22 10:47:20 +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>
|
|
|
|
|
2001-08-30 20:32:27 +00:00
|
|
|
struct sfx_s;
|
|
|
|
|
2001-08-23 04:01:46 +00:00
|
|
|
typedef struct snd_render_funcs_s {
|
2021-06-26 06:43:17 +00:00
|
|
|
void (*init) (void);
|
2021-06-22 06:35:37 +00:00
|
|
|
void (*ambient_off) (void);
|
|
|
|
void (*ambient_on) (void);
|
|
|
|
void (*static_sound) (struct sfx_s *sfx, const vec3_t origin, float vol, float attenuation);
|
2021-06-25 07:52:09 +00:00
|
|
|
void (*start_sound) (int entnum, int entchannel, struct sfx_s *sfx, const vec3_t origin, float vol, float attenuation);
|
2021-06-22 06:35:37 +00:00
|
|
|
void (*local_sound) (const char *s);
|
|
|
|
void (*stop_sound) (int entnum, int entchannel);
|
|
|
|
|
|
|
|
struct channel_s *(*alloc_channel) (void);
|
|
|
|
void (*channel_stop) (struct channel_s *chan);
|
|
|
|
|
|
|
|
struct sfx_s *(*precache_sound) (const char *sample);
|
|
|
|
struct sfx_s *(*load_sound) (const char *name);
|
|
|
|
|
|
|
|
void (*update) (const vec3_t origin, const vec3_t v_forward,
|
|
|
|
const vec3_t v_right, const vec3_t v_up,
|
|
|
|
const byte *ambient_sound_levels);
|
|
|
|
void (*stop_all_sounds) (void);
|
|
|
|
void (*extra_update) (void);
|
|
|
|
void (*block_sound) (void);
|
|
|
|
void (*unblock_sound) (void);
|
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 {
|
2021-06-22 06:35:37 +00:00
|
|
|
double *host_frametime;
|
|
|
|
int *viewentity;
|
2001-04-24 22:19:42 +00:00
|
|
|
|
2021-06-22 06:35:37 +00:00
|
|
|
unsigned *soundtime;
|
|
|
|
unsigned *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;
|
|
|
|
|
2021-06-22 10:47:20 +00:00
|
|
|
#endif // __QF_plugin_snd_render_h
|