32 sounds max would crash on windows because the openal limit is 24, tested an the...
[blender-staging.git] / intern / SoundSystem / SoundDefines.h
1 /*
2  * SoundDefines.h
3  *
4  * this is where all kinds of defines are stored
5  *
6  * $Id$
7  *
8  * ***** BEGIN GPL LICENSE BLOCK *****
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software Foundation,
22  * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23  *
24  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
25  * All rights reserved.
26  *
27  * The Original Code is: all of this file.
28  *
29  * Contributor(s): none yet.
30  *
31  * ***** END GPL LICENSE BLOCK *****
32  */
33
34 #ifndef __SOUNDDEFINES_H
35 #define __SOUNDDEFINES_H
36
37 /* the types of devices */
38 enum
39 {
40         snd_e_dummydevice = 0,
41         snd_e_fmoddevice,
42         snd_e_openaldevice
43 };
44
45 /* general stuff */
46 #define NUM_BUFFERS                                             128
47 #define NUM_SOURCES                                             24 /* 24 is the limit for openal on windows, was 16 in 2.47 and previous */
48
49 /* openal related stuff */
50 #define AL_LOOPING                                              0x1007
51
52 /* fmod related stuff */
53 #ifdef WIN32
54 #define MIXRATE                                                 22050
55 #else
56 #define MIXRATE                                                 44100
57 #endif
58 #define NUM_FMOD_MIN_HW_CHANNELS                16
59 #define NUM_FMOD_MAX_HW_CHANNELS                16
60
61 /* activelist defines */
62 enum
63 {
64         SND_REMOVE_ACTIVE_OBJECT = 0,
65         SND_ADD_ACTIVE_OBJECT,
66         SND_DO_NOTHING
67 };
68
69 /* playstate flags */
70 enum
71 {
72         SND_UNKNOWN = -1,
73         SND_INITIAL,
74         SND_MUST_PLAY,
75         SND_PLAYING,
76         SND_MUST_STOP,
77         SND_STOPPED,
78         SND_MUST_PAUSE,
79         SND_PAUSED,
80         SND_MUST_RESUME,
81         SND_MUST_STOP_WHEN_FINISHED,
82         SND_MUST_BE_DELETED
83 };
84
85 /* loopmodes */
86 enum
87 {
88         SND_LOOP_OFF = 0,
89         SND_LOOP_NORMAL,
90         SND_LOOP_BIDIRECTIONAL
91 };
92
93
94 /* cd playstate flags */
95 enum
96 {
97         SND_CD_ALL = 0,
98         SND_CD_TRACK,
99         SND_CD_TRACKLOOP
100 };
101
102 /* sample types */
103 enum
104 {
105         SND_WAVE_FORMAT_UNKNOWN = 0,
106         SND_WAVE_FORMAT_PCM,
107         SND_WAVE_FORMAT_ADPCM,
108         SND_WAVE_FORMAT_ALAW = 6,
109         SND_WAVE_FORMAT_MULAW,
110         SND_WAVE_FORMAT_DIALOGIC_OKI_ADPCM = 17,
111         SND_WAVE_FORMAT_CONTROL_RES_VQLPC = 34,
112         SND_WAVE_FORMAT_GSM_610 = 49,
113         SND_WAVE_FORMAT_MPEG3 = 85
114 };
115
116 #endif //__SOUNDDEFINES_H
117