1 /*
2 	QF/plugin/sound.h
3 
4 	Sound Output plugin data types
5 
6 	Copyright (C) 2001 Jeff Teunissen <deek@quakeforge.net>
7 
8 	This program is free software; you can redistribute it and/or
9 	modify it under the terms of the GNU General Public License
10 	as published by the Free Software Foundation; either version 2
11 	of the License, or (at your option) any later version.
12 
13 	This program is distributed in the hope that it will be useful,
14 	but WITHOUT ANY WARRANTY; without even the implied warranty of
15 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 
17 	See the GNU General Public License for more details.
18 
19 	You should have received a copy of the GNU General Public License
20 	along with this program; if not, write to:
21 
22 		Free Software Foundation, Inc.
23 		59 Temple Place - Suite 330
24 		Boston, MA  02111-1307, USA
25 
26 */
27 #ifndef __QF_plugin_snd_output_h_
28 #define __QF_plugin_snd_output_h_
29 
30 #include <QF/plugin.h>
31 #include <QF/qtypes.h>
32 
33 /*
34 	All sound plugins must export these functions
35 */
36 typedef volatile struct dma_s *(*P_S_O_Init) (void);
37 typedef void (*P_S_O_Shutdown) (void);
38 typedef int (*P_S_O_GetDMAPos) (void);
39 typedef void (*P_S_O_Submit) (void);
40 typedef void (*P_S_O_BlockSound) (void);
41 typedef void (*P_S_O_UnblockSound) (void);
42 
43 typedef struct snd_output_funcs_s {
44 	P_S_O_Init			pS_O_Init;
45 	P_S_O_Shutdown		pS_O_Shutdown;
46 	P_S_O_GetDMAPos		pS_O_GetDMAPos;
47 	P_S_O_Submit		pS_O_Submit;
48 	P_S_O_BlockSound	pS_O_BlockSound;
49 	P_S_O_UnblockSound	pS_O_UnblockSound;
50 } snd_output_funcs_t;
51 
52 typedef struct snd_output_data_s {
53 	unsigned   *soundtime;
54 	unsigned   *paintedtime;
55 } snd_output_data_t;
56 
57 #endif // __QF_plugin_snd_output_h_
58