1 /*(GPL)
2 ---------------------------------------------------------------------------
3 	audio_p.c - Private global audio engine stuff
4 ---------------------------------------------------------------------------
5  * Copyright (C) 2001, 2002, David Olofson
6  *
7  * This program is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU General Public License as published by the
9  * Free Software Foundation; either version 2.1 of the License, or (at your
10  * option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program; if not, write to the Free Software Foundation, Inc.,
19  * 675 Mass Ave, Cambridge, MA 02139, USA.
20  */
21 
22 #include "a_globals.h"
23 
24 /* For debug oscilloscope */
25 #ifdef DEBUG
26 	int *oscbufl = NULL;
27 	int *oscbufr = NULL;
28 	int oscframes = 0;
29 	int oscpos = 0;
30 #endif
31 
32 int _audio_running = 0;
33 
34 
35 /* Global engine settings: defaults  */
36 struct settings_t a_settings = {
37 	44100,		/* samplerate */
38 	256,		/* output_buffersize */
39 	32,		/* buffersize */
40 	AQ_HIGH		/* quality */
41 };
42 
43 
44 /*
45  * Default control values
46  */
47 accbank_t a_channel_def_ctl = {
48 	0,		/* ACC_GROUP */
49 	1000,		/* ACC_PRIORITY */
50 	0,		/* ACC_PATCH */
51 
52 	0,		/* ACC_PRIM_BUS */
53 	-1,		/* ACC_SEND_BUS	[Off] */
54 
55 	0,		/* ACC_PAN	[0.0] */
56 	60<<16,		/* ACC_PITCH	[1.0 * sample_rate] */
57 
58 	65536,		/* ACC_VOLUME	[1.0] */
59 	0,		/* ACC_SEND	[0.0] */
60 
61 	0,		/* ACC_MOD1	[0.0] */
62 	0,		/* ACC_MOD2	[0.0] */
63 	0,		/* ACC_MOD3	[0.0] */
64 
65 	0,		/* ACC_X	[0.0] */
66 	0,		/* ACC_Y	[0.0] */
67 	0		/* ACC_Z	[0.0] */
68 };
69 
70 accbank_t a_group_def_ctl = {
71 	0,		/* ACC_GROUP */
72 	1000,		/* ACC_PRIORITY */
73 	0,		/* ACC_PATCH */
74 
75 	0,		/* ACC_PRIM_BUS */
76 	-1,		/* ACC_SEND_BUS	[Off] */
77 
78 	0,		/* ACC_PAN	[0.0] */
79 	60<<16,		/* ACC_PITCH	[1.0 * sample_rate] */
80 
81 	65536,		/* ACC_VOLUME	[1.0] */
82 	65536,		/* ACC_SEND	[1.0] */
83 
84 	0,		/* ACC_MOD1	[0.0] */
85 	0,		/* ACC_MOD2	[0.0] */
86 	0,		/* ACC_MOD3	[0.0] */
87 
88 	0,		/* ACC_X	[0.0] */
89 	0,		/* ACC_Y	[0.0] */
90 	0		/* ACC_Z	[0.0] */
91 };
92 
93 
94 abcbank_t a_bus_def_ctl = {
95 	0,	/* ABC_FX_TYPE[None - allpass] */
96 	0,	/* ABC_FX_PARAM_1 */
97 	0,	/* ABC_FX_PARAM_2 */
98 	0,	/* ABC_FX_PARAM_3 */
99 	0,	/* ABC_FX_PARAM_4 */
100 	0,	/* ABC_FX_PARAM_5 */
101 	0,	/* ABC_FX_PARAM_6 */
102 
103 	0,	/* ABC_SEND_MASTER */
104 
105 	0,	/* ABC_SEND_BUS_0 */
106 	0,	/* ABC_SEND_BUS_1 */
107 	0,	/* ABC_SEND_BUS_2 */
108 	0,	/* ABC_SEND_BUS_3 */
109 	0,	/* ABC_SEND_BUS_4 */
110 	0,	/* ABC_SEND_BUS_5 */
111 	0,	/* ABC_SEND_BUS_6 */
112 	0	/* ABC_SEND_BUS_7 */
113 };
114