View | Details | Raw Unified | Return to bug 567
Collapse All | Expand All

(-)a/make/build.xml (+21 lines)
Lines 172-177 Link Here
172
        <property name="joal.constants.cfg" value="${config}/joal-constants.cfg" />
172
        <property name="joal.constants.cfg" value="${config}/joal-constants.cfg" />
173
        <property name="joal.alc.cfg" value="${config}/joal-alc.cfg" />
173
        <property name="joal.alc.cfg" value="${config}/joal-alc.cfg" />
174
        <property name="joal.alc.constants.cfg" value="${config}/joal-alc-constants.cfg" />
174
        <property name="joal.alc.constants.cfg" value="${config}/joal-alc-constants.cfg" />
175
        <property name="joal.alext.cfg" value="${config}/joal-alext.cfg" />
176
        <property name="joal.alext.constants.cfg" value="${config}/joal-alext-constants.cfg" />
175
177
176
        <!-- Create the required output directories. -->
178
        <!-- Create the required output directories. -->
177
        <mkdir dir="${src.generated.java}" />
179
        <mkdir dir="${src.generated.java}" />
Lines 273-278 Link Here
273
            <classpath refid="gluegen.classpath" />
275
            <classpath refid="gluegen.classpath" />
274
        </gluegen>
276
        </gluegen>
275
277
278
    <!-- Generate the ALExt interface class and implementation -->
279
        <gluegen src="${stub.includes.openal}/alext.h"
280
                 outputRootDir="${build}"
281
                 config="${joal.alext.cfg}"
282
                 includeRefid="stub.includes.fileset.all"
283
                 emitter="com.jogamp.gluegen.procaddress.ProcAddressEmitter">
284
            <classpath refid="gluegen.classpath" />
285
        </gluegen>
286
287
    <!-- Generate the ALExt constants interface -->
288
        <gluegen src="${stub.includes.openal}/alext.h"
289
                 outputRootDir="${build}"
290
                 config="${joal.alext.constants.cfg}"
291
                 includeRefid="stub.includes.fileset.all"
292
                 emitter="com.jogamp.gluegen.JavaEmitter">
293
            <classpath refid="gluegen.classpath" />
294
        </gluegen>
295
296
276
        <!-- Inform the user that the generators have successfully created
297
        <!-- Inform the user that the generators have successfully created
277
           - the necessary Java files -->
298
           - the necessary Java files -->
278
        <echo message="" />
299
        <echo message="" />
(-)a/make/joal-alext-constants.cfg (+9 lines)
Line 0 Link Here
1
# This .cfg file is used to generate the ALCConstants interface.
2
Include joal-common.cfg
3
4
Style InterfaceOnly
5
JavaClass ALExtConstants
6
7
# Factor out the OpenAL constants into their own interface
8
#IgnoreNot ^ALC_.+
9
IgnoreNot ^AL.+
(-)a/make/joal-alext.cfg (+41 lines)
Line 0 Link Here
1
# This .cfg file is used to generate the JOAL interface.
2
Include joal-common.cfg
3
4
Style InterfaceAndImpl
5
JavaClass ALExt
6
ImplPackage jogamp.openal
7
ImplJavaClass ALExtAbstractImpl
8
AccessControl ALExtAbstractImpl PUBLIC_ABSTRACT
9
Extends ALExt ALExtConstants
10
11
EmitProcAddressTable true
12
ProcAddressTableClassName ALExtProcAddressTable
13
GetProcAddressTableExpr alExtProcAddressTable
14
ProcAddressNameExpr LP $UPPERCASE({0})
15
 
16
Import java.io.UnsupportedEncodingException
17
Import java.util.*
18
Import com.jogamp.openal.*
19
Import jogamp.openal.*
20
21
# Factor out the OpenAL constants into their own interface
22
Ignore ^AL_.+
23
Ignore ^ALC_.+
24
25
IncludeAs CustomJavaCode ALExtAbstractImpl joal-alextabstract-CustomJavaCode.java
26
27
# Mappings for data types
28
Opaque boolean ALCboolean
29
30
# These routines use or return strings
31
ArgumentIsString alcLoopbackOpenDeviceSOFT 0
32
33
# Provide #includes to native code
34
CustomCCode #include "alext.h"
35
36
# Indicate that the direct buffers for ALCcontext, etc. are "opaque",
37
# i.e., the user shouldn't be poking around in them
38
ReturnValueCapacity alcLoopbackOpenDeviceSOFT 0
39
40
IncludeAs CustomCCode joal-common-CustomCCode.c
41
(-)a/make/joal-alextabstract-CustomJavaCode.java (+12 lines)
Line 0 Link Here
1
private static final ALExtProcAddressTable alExtProcAddressTable;
2
3
static {
4
    alExtProcAddressTable = new ALExtProcAddressTable();
5
    if(null==alExtProcAddressTable) {
6
      throw new RuntimeException("Couldn't instantiate ALExtProcAddressTable");
7
    }
8
    alExtProcAddressTable.reset(ALImpl.alDynamicLookupHelper);
9
}
10
11
public static ALExtProcAddressTable getALExtProcAddressTable() { return alExtProcAddressTable; }
12
(-)a/make/stub_includes/openal/al-types.h (+87 lines)
Line 0 Link Here
1
#ifndef AL_AL_TYPES_H
2
#define AL_AL_TYPES_H
3
4
#if defined(__cplusplus)
5
extern "C" {
6
#endif
7
8
#ifndef AL_API
9
 #if defined(AL_LIBTYPE_STATIC)
10
  #define AL_API
11
 #elif defined(_WIN32)
12
  #define AL_API __declspec(dllimport)
13
 #else
14
  #define AL_API extern
15
 #endif
16
#endif
17
18
#if defined(_WIN32)
19
 #define AL_APIENTRY __cdecl
20
#else
21
 #define AL_APIENTRY
22
#endif
23
24
#if defined(TARGET_OS_MAC) && TARGET_OS_MAC
25
 #pragma export on
26
#endif
27
28
/*
29
 * The OPENAL, ALAPI, ALAPIENTRY, AL_INVALID, AL_ILLEGAL_ENUM, and
30
 * AL_ILLEGAL_COMMAND macros are deprecated, but are included for
31
 * applications porting code from AL 1.0
32
 */
33
#define OPENAL
34
#define ALAPI AL_API
35
#define ALAPIENTRY AL_APIENTRY
36
#define AL_INVALID                                (-1)
37
#define AL_ILLEGAL_ENUM                           AL_INVALID_ENUM
38
#define AL_ILLEGAL_COMMAND                        AL_INVALID_OPERATION
39
40
#define AL_VERSION_1_0
41
#define AL_VERSION_1_1
42
43
44
/** 8-bit boolean */
45
typedef char ALboolean;
46
47
/** character */
48
typedef char ALchar;
49
50
/** signed 8-bit 2's complement integer */
51
typedef signed char ALbyte;
52
53
/** unsigned 8-bit integer */
54
typedef unsigned char ALubyte;
55
56
/** signed 16-bit 2's complement integer */
57
typedef short ALshort;
58
59
/** unsigned 16-bit integer */
60
typedef unsigned short ALushort;
61
62
/** signed 32-bit 2's complement integer */
63
typedef int ALint;
64
65
/** unsigned 32-bit integer */
66
typedef unsigned int ALuint;
67
68
/** non-negative 32-bit binary integer size */
69
typedef int ALsizei;
70
71
/** enumerated 32-bit value */
72
typedef int ALenum;
73
74
/** 32-bit IEEE754 floating-point */
75
typedef float ALfloat;
76
77
/** 64-bit IEEE754 floating-point */
78
typedef double ALdouble;
79
80
/** void type (for opaque pointers only) */
81
typedef void ALvoid;
82
83
#if defined(__cplusplus)
84
}  /* extern "C" */
85
#endif
86
87
#endif /* AL_AL_TYPES_H */
(-)a/make/stub_includes/openal/al.h (-121 / +9 lines)
Lines 1-108 Link Here
1
#ifndef AL_AL_H
1
#ifndef AL_AL_H
2
#define AL_AL_H
2
#define AL_AL_H
3
3
4
/**
4
#include "al-types.h"
5
 * OpenAL cross platform audio library
6
 * Copyright (C) 1999-2000 by authors.
7
 * This library is free software; you can redistribute it and/or
8
 *  modify it under the terms of the GNU Library General Public
9
 *  License as published by the Free Software Foundation; either
10
 *  version 2 of the License, or (at your option) any later version.
11
 *
12
 * This library is distributed in the hope that it will be useful,
13
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
 *  Library General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU Library General Public
18
 *  License along with this library; if not, write to the
19
 *  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
 *  Boston, MA  02111-1307, USA.
21
 * Or go to http://www.gnu.org/copyleft/lgpl.html
22
 */
23
5
24
#if defined(__cplusplus)
6
#if defined(__cplusplus)
25
extern "C" {
7
extern "C" {
26
#endif
8
#endif
27
9
28
#if defined(_WIN32) && !defined(_XBOX)
29
 /* _OPENAL32LIB is deprecated */
30
 #if defined(AL_BUILD_LIBRARY) || defined (_OPENAL32LIB)
31
  #define AL_API __declspec(dllexport)
32
 #else
33
  #define AL_API __declspec(dllimport)
34
 #endif
35
#else
36
 #define AL_API extern
37
#endif
38
39
#if defined(_WIN32)
40
 #define AL_APIENTRY __cdecl
41
#else
42
 #define AL_APIENTRY
43
#endif
44
45
#if TARGET_OS_MAC
46
 #pragma export on
47
#endif
48
49
/* The OPENAL, ALAPI, and ALAPIENTRY macros are deprecated, but are included for applications porting code
50
   from AL 1.0 */
51
#define OPENAL
52
#define ALAPI AL_API
53
#define ALAPIENTRY AL_APIENTRY
54
55
#define AL_VERSION_1_0
56
#define AL_VERSION_1_1
57
58
59
/** 8-bit boolean */
60
typedef char ALboolean;
61
62
/** character */
63
typedef char ALchar;
64
65
/** signed 8-bit 2's complement integer */
66
typedef char ALbyte;
67
68
/** unsigned 8-bit integer */
69
typedef unsigned char ALubyte;
70
71
/** signed 16-bit 2's complement integer */
72
typedef short ALshort;
73
74
/** unsigned 16-bit integer */
75
typedef unsigned short ALushort;
76
77
/** signed 32-bit 2's complement integer */
78
typedef int ALint;
79
80
/** unsigned 32-bit integer */
81
typedef unsigned int ALuint;
82
83
/** non-negative 32-bit binary integer size */
84
typedef int ALsizei;
85
86
/** enumerated 32-bit value */
87
typedef int ALenum;
88
89
/** 32-bit IEEE754 floating-point */
90
typedef float ALfloat;
91
92
/** 64-bit IEEE754 floating-point */
93
typedef double ALdouble;
94
95
/** void type (for opaque pointers only) */
96
typedef void ALvoid;
97
98
/** Function pointer type */
99
typedef void* ALproc;
100
101
/* Enumerant values begin at column 50. No tabs. */
10
/* Enumerant values begin at column 50. No tabs. */
102
11
103
/* bad value */
12
/* "no distance model" or "no buffer" */
104
#define AL_INVALID                                -1
105
106
#define AL_NONE                                   0
13
#define AL_NONE                                   0
107
14
108
/* Boolean False. */
15
/* Boolean False. */
Lines 131-138 typedef void* ALproc; Link Here
131
#define AL_CONE_OUTER_ANGLE                       0x1002
38
#define AL_CONE_OUTER_ANGLE                       0x1002
132
39
133
/**
40
/**
134
 * Specify the pitch to be applied, either at source,
41
 * Specify the pitch to be applied at source.
135
 *  or on mixer results, at listener.
136
 * Range:   [0.5-2.0]
42
 * Range:   [0.5-2.0]
137
 * Default: 1.0
43
 * Default: 1.0
138
 */
44
 */
Lines 210-223 typedef void* ALproc; Link Here
210
#define AL_ORIENTATION                            0x100F
116
#define AL_ORIENTATION                            0x100F
211
117
212
/**
118
/**
213
 * Specify the channel mask. (Creative)
214
 * Type: ALuint
215
 * Range: [0 - 255]
216
 */
217
#define AL_CHANNEL_MASK                           0x3000
218
219
220
/**
221
 * Source state information.
119
 * Source state information.
222
 */
120
 */
223
#define AL_SOURCE_STATE                           0x1010
121
#define AL_SOURCE_STATE                           0x1010
Lines 315-321 typedef void* ALproc; Link Here
315
213
316
214
317
/** Errors: No Error. */
215
/** Errors: No Error. */
318
#define AL_NO_ERROR                               AL_FALSE
216
#define AL_NO_ERROR                               0
319
217
320
/** 
218
/** 
321
 * Invalid Name paramater passed to AL call.
219
 * Invalid Name paramater passed to AL call.
Lines 325-331 typedef void* ALproc; Link Here
325
/** 
223
/** 
326
 * Invalid parameter passed to AL call.
224
 * Invalid parameter passed to AL call.
327
 */
225
 */
328
#define AL_ILLEGAL_ENUM                           0xA002
329
#define AL_INVALID_ENUM                           0xA002
226
#define AL_INVALID_ENUM                           0xA002
330
227
331
/** 
228
/** 
Lines 336-342 typedef void* ALproc; Link Here
336
/** 
233
/** 
337
 * Illegal call.
234
 * Illegal call.
338
 */
235
 */
339
#define AL_ILLEGAL_COMMAND                        0xA004
340
#define AL_INVALID_OPERATION                      0xA004
236
#define AL_INVALID_OPERATION                      0xA004
341
237
342
  
238
  
Lines 384-394 typedef void* ALproc; Link Here
384
#define AL_EXPONENT_DISTANCE                      0xD005
280
#define AL_EXPONENT_DISTANCE                      0xD005
385
#define AL_EXPONENT_DISTANCE_CLAMPED              0xD006
281
#define AL_EXPONENT_DISTANCE_CLAMPED              0xD006
386
282
387
388
/* FIXME: no way to parse both the prototypes and the function pointer typedefs. */
389
/* GlueGen requires both in order to recognize a function as dynamically linked. */
390
/* #if !defined(AL_NO_PROTOTYPES) */
391
392
/*
283
/*
393
 * Renderer State management
284
 * Renderer State management
394
 */
285
 */
Lines 435-441 AL_API ALenum AL_APIENTRY alGetError( void ); Link Here
435
 */
326
 */
436
AL_API ALboolean AL_APIENTRY alIsExtensionPresent( const ALchar* extname );
327
AL_API ALboolean AL_APIENTRY alIsExtensionPresent( const ALchar* extname );
437
328
438
AL_API ALproc AL_APIENTRY alGetProcAddress( const ALchar* fname );
329
AL_API void* AL_APIENTRY alGetProcAddress( const ALchar* fname );
439
330
440
AL_API ALenum AL_APIENTRY alGetEnumValue( const ALchar* ename );
331
AL_API ALenum AL_APIENTRY alGetEnumValue( const ALchar* ename );
441
332
Lines 665-673 AL_API void AL_APIENTRY alSpeedOfSound( ALfloat value ); Link Here
665
556
666
AL_API void AL_APIENTRY alDistanceModel( ALenum distanceModel );
557
AL_API void AL_APIENTRY alDistanceModel( ALenum distanceModel );
667
558
668
/* FIXME: see above */
559
/*
669
/* #else */ /* AL_NO_PROTOTYPES */
560
 * Pointer-to-function types, useful for dynamically getting AL entry points.
670
561
 */
671
typedef void           (AL_APIENTRY *LPALENABLE)( ALenum capability );
562
typedef void           (AL_APIENTRY *LPALENABLE)( ALenum capability );
672
typedef void           (AL_APIENTRY *LPALDISABLE)( ALenum capability ); 
563
typedef void           (AL_APIENTRY *LPALDISABLE)( ALenum capability ); 
673
typedef ALboolean      (AL_APIENTRY *LPALISENABLED)( ALenum capability ); 
564
typedef ALboolean      (AL_APIENTRY *LPALISENABLED)( ALenum capability ); 
Lines 742-751 typedef void (AL_APIENTRY *LPALDOPPLERVELOCITY)( ALfloat value ); Link Here
742
typedef void           (AL_APIENTRY *LPALSPEEDOFSOUND)( ALfloat value );
633
typedef void           (AL_APIENTRY *LPALSPEEDOFSOUND)( ALfloat value );
743
typedef void           (AL_APIENTRY *LPALDISTANCEMODEL)( ALenum distanceModel );
634
typedef void           (AL_APIENTRY *LPALDISTANCEMODEL)( ALenum distanceModel );
744
635
745
/* FIXME: see above */
636
#if defined(TARGET_OS_MAC) && TARGET_OS_MAC
746
/* #endif */ /* AL_NO_PROTOTYPES */
747
748
#if TARGET_OS_MAC
749
 #pragma export off
637
 #pragma export off
750
#endif
638
#endif
751
639
(-)a/make/stub_includes/openal/alc-types.h (+86 lines)
Line 0 Link Here
1
#ifndef AL_ALC_TYPES_H
2
#define AL_ALC_TYPES_H
3
4
#if defined(__cplusplus)
5
extern "C" {
6
#endif
7
8
#ifndef ALC_API
9
 #if defined(AL_LIBTYPE_STATIC)
10
  #define ALC_API
11
 #elif defined(_WIN32)
12
  #define ALC_API __declspec(dllimport)
13
 #else
14
  #define ALC_API extern
15
 #endif
16
#endif
17
18
#if defined(_WIN32)
19
 #define ALC_APIENTRY __cdecl
20
#else
21
 #define ALC_APIENTRY
22
#endif
23
24
#if defined(TARGET_OS_MAC) && TARGET_OS_MAC
25
 #pragma export on
26
#endif
27
28
/*
29
 * The ALCAPI, ALCAPIENTRY, and ALC_INVALID macros are deprecated, but are
30
 * included for applications porting code from AL 1.0
31
 */
32
#define ALCAPI ALC_API
33
#define ALCAPIENTRY ALC_APIENTRY
34
#define ALC_INVALID 0
35
36
37
#define ALC_VERSION_0_1         1
38
39
typedef struct ALCdevice_struct ALCdevice;
40
typedef struct ALCcontext_struct ALCcontext;
41
42
43
/** 8-bit boolean */
44
typedef char ALCboolean;
45
46
/** character */
47
typedef char ALCchar;
48
49
/** signed 8-bit 2's complement integer */
50
typedef signed char ALCbyte;
51
52
/** unsigned 8-bit integer */
53
typedef unsigned char ALCubyte;
54
55
/** signed 16-bit 2's complement integer */
56
typedef short ALCshort;
57
58
/** unsigned 16-bit integer */
59
typedef unsigned short ALCushort;
60
61
/** signed 32-bit 2's complement integer */
62
typedef int ALCint;
63
64
/** unsigned 32-bit integer */
65
typedef unsigned int ALCuint;
66
67
/** non-negative 32-bit binary integer size */
68
typedef int ALCsizei;
69
70
/** enumerated 32-bit value */
71
typedef int ALCenum;
72
73
/** 32-bit IEEE754 floating-point */
74
typedef float ALCfloat;
75
76
/** 64-bit IEEE754 floating-point */
77
typedef double ALCdouble;
78
79
/** void type (for opaque pointers only) */
80
typedef void ALCvoid;
81
82
#if defined(__cplusplus)
83
}  /* extern "C" */
84
#endif
85
86
#endif /* AL_ALC_TYPES_H */
(-)a/make/stub_includes/openal/alc.h (-88 / +18 lines)
Lines 1-87 Link Here
1
#ifndef AL_ALC_H
1
#ifndef AL_ALC_H
2
#define AL_ALC_H
2
#define AL_ALC_H
3
3
4
#include "alc-types.h"
5
4
#if defined(__cplusplus)
6
#if defined(__cplusplus)
5
extern "C" {
7
extern "C" {
6
#endif
8
#endif
7
9
8
#if defined(_WIN32) && !defined(_XBOX)
9
 /* _OPENAL32LIB is deprecated */
10
 #if defined(AL_BUILD_LIBRARY) || defined (_OPENAL32LIB)
11
  #define ALC_API __declspec(dllexport)
12
 #else
13
  #define ALC_API __declspec(dllimport)
14
 #endif
15
#else
16
 #define ALC_API extern
17
#endif
18
19
#if defined(_WIN32)
20
 #define ALC_APIENTRY __cdecl
21
#else
22
 #define ALC_APIENTRY
23
#endif
24
25
#if TARGET_OS_MAC
26
 #pragma export on
27
#endif
28
29
/* The ALCAPI, and ALCAPIENTRY macros are deprecated, but are included for applications porting code
30
   from AL 1.0 */
31
#define ALCAPI ALC_API
32
#define ALCAPIENTRY ALC_APIENTRY
33
34
#define ALC_VERSION_0_1         1
35
36
typedef struct ALCdevice_struct ALCdevice;
37
typedef struct ALCcontext_struct ALCcontext;
38
39
40
/** 8-bit boolean */
41
typedef char ALCboolean;
42
43
/** character */
44
typedef char ALCchar;
45
46
/** signed 8-bit 2's complement integer */
47
typedef char ALCbyte;
48
49
/** unsigned 8-bit integer */
50
typedef unsigned char ALCubyte;
51
52
/** signed 16-bit 2's complement integer */
53
typedef short ALCshort;
54
55
/** unsigned 16-bit integer */
56
typedef unsigned short ALCushort;
57
58
/** signed 32-bit 2's complement integer */
59
typedef int ALCint;
60
61
/** unsigned 32-bit integer */
62
typedef unsigned int ALCuint;
63
64
/** non-negative 32-bit binary integer size */
65
typedef int ALCsizei;
66
67
/** enumerated 32-bit value */
68
typedef int ALCenum;
69
70
/** 32-bit IEEE754 floating-point */
71
typedef float ALCfloat;
72
73
/** 64-bit IEEE754 floating-point */
74
typedef double ALCdouble;
75
76
/** void type (for opaque pointers only) */
77
typedef void ALCvoid;
78
79
80
/* Enumerant values begin at column 50. No tabs. */
10
/* Enumerant values begin at column 50. No tabs. */
81
11
82
/* bad value */
83
#define ALC_INVALID                              0
84
85
/* Boolean False. */
12
/* Boolean False. */
86
#define ALC_FALSE                                0
13
#define ALC_FALSE                                0
87
14
Lines 120-126 typedef void ALCvoid; Link Here
120
/**
47
/**
121
 * No error
48
 * No error
122
 */
49
 */
123
#define ALC_NO_ERROR                             ALC_FALSE
50
#define ALC_NO_ERROR                             0
124
51
125
/**
52
/**
126
 * No device
53
 * No device
Lines 161-177 typedef void ALCvoid; Link Here
161
#define ALC_ATTRIBUTES_SIZE                      0x1002
88
#define ALC_ATTRIBUTES_SIZE                      0x1002
162
#define ALC_ALL_ATTRIBUTES                       0x1003
89
#define ALC_ALL_ATTRIBUTES                       0x1003
163
90
91
164
/**
92
/**
165
 * Capture extension
93
 * Capture extension
166
 */
94
 */
95
#define ALC_EXT_CAPTURE 1
167
#define ALC_CAPTURE_DEVICE_SPECIFIER             0x310
96
#define ALC_CAPTURE_DEVICE_SPECIFIER             0x310
168
#define ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER     0x311
97
#define ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER     0x311
169
#define ALC_CAPTURE_SAMPLES                      0x312
98
#define ALC_CAPTURE_SAMPLES                      0x312
170
99
171
100
172
/* FIXME: no way to parse both the prototypes and the function pointer typedefs. */
101
/**
173
/* GlueGen requires both in order to recognize a function as dynamically linked. */
102
 * ALC_ENUMERATE_ALL_EXT enums
174
/* #if !defined(ALC_NO_PROTOTYPES) */
103
 */
104
#define ALC_ENUMERATE_ALL_EXT 1
105
#define ALC_DEFAULT_ALL_DEVICES_SPECIFIER        0x1012
106
#define ALC_ALL_DEVICES_SPECIFIER                0x1013
107
175
108
176
/*
109
/*
177
 * Context Management
110
 * Context Management
Lines 186-192 ALC_API void ALC_APIENTRY alcSuspendContext( ALCcontext *context ); Link Here
186
119
187
ALC_API void            ALC_APIENTRY alcDestroyContext( ALCcontext *context );
120
ALC_API void            ALC_APIENTRY alcDestroyContext( ALCcontext *context );
188
121
189
ALC_API ALCcontext *    ALC_APIENTRY alcGetCurrentContext( ALCvoid );
122
ALC_API ALCcontext *    ALC_APIENTRY alcGetCurrentContext( void );
190
123
191
ALC_API ALCdevice*      ALC_APIENTRY alcGetContextsDevice( ALCcontext *context );
124
ALC_API ALCdevice*      ALC_APIENTRY alcGetContextsDevice( ALCcontext *context );
192
125
Lines 239-253 ALC_API void ALC_APIENTRY alcCaptureStop( ALCdevice *device ); Link Here
239
172
240
ALC_API void            ALC_APIENTRY alcCaptureSamples( ALCdevice *device, ALCvoid *buffer, ALCsizei samples );
173
ALC_API void            ALC_APIENTRY alcCaptureSamples( ALCdevice *device, ALCvoid *buffer, ALCsizei samples );
241
174
242
/* FIXME: see above */
175
/*
243
/* #else */ /* ALC_NO_PROTOTYPES */
176
 * Pointer-to-function types, useful for dynamically getting ALC entry points.
244
177
 */
245
typedef ALCcontext *   (ALC_APIENTRY *LPALCCREATECONTEXT) (ALCdevice *device, const ALCint *attrlist);
178
typedef ALCcontext *   (ALC_APIENTRY *LPALCCREATECONTEXT) (ALCdevice *device, const ALCint *attrlist);
246
typedef ALCboolean     (ALC_APIENTRY *LPALCMAKECONTEXTCURRENT)( ALCcontext *context );
179
typedef ALCboolean     (ALC_APIENTRY *LPALCMAKECONTEXTCURRENT)( ALCcontext *context );
247
typedef void           (ALC_APIENTRY *LPALCPROCESSCONTEXT)( ALCcontext *context );
180
typedef void           (ALC_APIENTRY *LPALCPROCESSCONTEXT)( ALCcontext *context );
248
typedef void           (ALC_APIENTRY *LPALCSUSPENDCONTEXT)( ALCcontext *context );
181
typedef void           (ALC_APIENTRY *LPALCSUSPENDCONTEXT)( ALCcontext *context );
249
typedef void           (ALC_APIENTRY *LPALCDESTROYCONTEXT)( ALCcontext *context );
182
typedef void           (ALC_APIENTRY *LPALCDESTROYCONTEXT)( ALCcontext *context );
250
typedef ALCcontext *   (ALC_APIENTRY *LPALCGETCURRENTCONTEXT)( ALCvoid );
183
typedef ALCcontext *   (ALC_APIENTRY *LPALCGETCURRENTCONTEXT)( void );
251
typedef ALCdevice *    (ALC_APIENTRY *LPALCGETCONTEXTSDEVICE)( ALCcontext *context );
184
typedef ALCdevice *    (ALC_APIENTRY *LPALCGETCONTEXTSDEVICE)( ALCcontext *context );
252
typedef ALCdevice *    (ALC_APIENTRY *LPALCOPENDEVICE)( const ALCchar *devicename );
185
typedef ALCdevice *    (ALC_APIENTRY *LPALCOPENDEVICE)( const ALCchar *devicename );
253
typedef ALCboolean     (ALC_APIENTRY *LPALCCLOSEDEVICE)( ALCdevice *device );
186
typedef ALCboolean     (ALC_APIENTRY *LPALCCLOSEDEVICE)( ALCdevice *device );
Lines 263-272 typedef void (ALC_APIENTRY *LPALCCAPTURESTART)( ALCdevice *device ); Link Here
263
typedef void           (ALC_APIENTRY *LPALCCAPTURESTOP)( ALCdevice *device );
196
typedef void           (ALC_APIENTRY *LPALCCAPTURESTOP)( ALCdevice *device );
264
typedef void           (ALC_APIENTRY *LPALCCAPTURESAMPLES)( ALCdevice *device, ALCvoid *buffer, ALCsizei samples );
197
typedef void           (ALC_APIENTRY *LPALCCAPTURESAMPLES)( ALCdevice *device, ALCvoid *buffer, ALCsizei samples );
265
198
266
/* FIXME: see above */
199
#if defined(TARGET_OS_MAC) && TARGET_OS_MAC
267
/* #endif */ /* ALC_NO_PROTOTYPES */
268
269
#if TARGET_OS_MAC
270
 #pragma export off
200
 #pragma export off
271
#endif
201
#endif
272
202
(-)a/make/stub_includes/openal/alext.h (-12 / +208 lines)
Lines 21-26 Link Here
21
#ifndef AL_ALEXT_H
21
#ifndef AL_ALEXT_H
22
#define AL_ALEXT_H
22
#define AL_ALEXT_H
23
23
24
//#include <stddef.h>
25
26
// joal: define prototypes, and disable ext_foldback (requires custom callback code)
27
#define AL_ALEXT_PROTOTYPES
28
#define AL_EXT_FOLDBACK
29
#include "al-types.h"
30
#include "alc-types.h"
31
24
#ifdef __cplusplus
32
#ifdef __cplusplus
25
extern "C" {
33
extern "C" {
26
#endif
34
#endif
Lines 53-58 extern "C" { Link Here
53
#define AL_FORMAT_STEREO_FLOAT32                 0x10011
61
#define AL_FORMAT_STEREO_FLOAT32                 0x10011
54
#endif
62
#endif
55
63
64
#ifndef AL_EXT_double
65
#define AL_EXT_double 1
66
#define AL_FORMAT_MONO_DOUBLE_EXT                0x10012
67
#define AL_FORMAT_STEREO_DOUBLE_EXT              0x10013
68
#endif
69
70
#ifndef AL_EXT_MULAW
71
#define AL_EXT_MULAW 1
72
#define AL_FORMAT_MONO_MULAW_EXT                 0x10014
73
#define AL_FORMAT_STEREO_MULAW_EXT               0x10015
74
#endif
75
76
#ifndef AL_EXT_ALAW
77
#define AL_EXT_ALAW 1
78
#define AL_FORMAT_MONO_ALAW_EXT                  0x10016
79
#define AL_FORMAT_STEREO_ALAW_EXT                0x10017
80
#endif
81
56
#ifndef ALC_LOKI_audio_channel
82
#ifndef ALC_LOKI_audio_channel
57
#define ALC_LOKI_audio_channel 1
83
#define ALC_LOKI_audio_channel 1
58
#define ALC_CHAN_MAIN_LOKI                       0x500001
84
#define ALC_CHAN_MAIN_LOKI                       0x500001
Lines 60-71 extern "C" { Link Here
60
#define ALC_CHAN_CD_LOKI                         0x500003
86
#define ALC_CHAN_CD_LOKI                         0x500003
61
#endif
87
#endif
62
88
63
#ifndef ALC_ENUMERATE_ALL_EXT
64
#define ALC_ENUMERATE_ALL_EXT 1
65
#define ALC_DEFAULT_ALL_DEVICES_SPECIFIER        0x1012
66
#define ALC_ALL_DEVICES_SPECIFIER                0x1013
67
#endif
68
69
#ifndef AL_EXT_MCFORMATS
89
#ifndef AL_EXT_MCFORMATS
70
#define AL_EXT_MCFORMATS 1
90
#define AL_EXT_MCFORMATS 1
71
#define AL_FORMAT_QUAD8                          0x1204
91
#define AL_FORMAT_QUAD8                          0x1204
Lines 85-102 extern "C" { Link Here
85
#define AL_FORMAT_71CHN32                        0x1212
105
#define AL_FORMAT_71CHN32                        0x1212
86
#endif
106
#endif
87
107
108
#ifndef AL_EXT_MULAW_MCFORMATS
109
#define AL_EXT_MULAW_MCFORMATS 1
110
#define AL_FORMAT_MONO_MULAW                     0x10014
111
#define AL_FORMAT_STEREO_MULAW                   0x10015
112
#define AL_FORMAT_QUAD_MULAW                     0x10021
113
#define AL_FORMAT_REAR_MULAW                     0x10022
114
#define AL_FORMAT_51CHN_MULAW                    0x10023
115
#define AL_FORMAT_61CHN_MULAW                    0x10024
116
#define AL_FORMAT_71CHN_MULAW                    0x10025
117
#endif
118
88
#ifndef AL_EXT_IMA4
119
#ifndef AL_EXT_IMA4
89
#define AL_EXT_IMA4 1
120
#define AL_EXT_IMA4 1
90
#define AL_FORMAT_MONO_IMA4                      0x1300
121
#define AL_FORMAT_MONO_IMA4                      0x1300
91
#define AL_FORMAT_STEREO_IMA4                    0x1301
122
#define AL_FORMAT_STEREO_IMA4                    0x1301
92
#endif
123
#endif
93
124
94
#ifndef AL_EXT_buffer_sub_data
125
#ifndef AL_EXT_STATIC_BUFFER
95
#define AL_EXT_buffer_sub_data 1
126
#define AL_EXT_STATIC_BUFFER 1
96
#define AL_BYTE_RW_OFFSETS_EXT                   0x1031
127
typedef ALvoid (AL_APIENTRY*LPALBUFFERDATASTATICPROC)(const ALint,ALenum,ALvoid*,ALsizei,ALsizei);
97
#define AL_SAMPLE_RW_OFFSETS_EXT                 0x1032
128
#ifdef AL_ALEXT_PROTOTYPES
98
#define AL_SEC_RW_OFFSETS_EXT                    0x1033
129
AL_API ALvoid AL_APIENTRY alBufferDataStatic(const ALint buffer, ALenum format, ALvoid *data, ALsizei len, ALsizei freq);
99
typedef ALvoid (AL_APIENTRY*PFNALBUFFERSUBDATAEXTPROC)(ALuint,ALenum,const ALvoid*,ALsizei,ALsizei);
130
#endif
131
#endif
132
133
#ifndef ALC_EXT_EFX
134
#define ALC_EXT_EFX 1
135
#include "efx.h"
136
#endif
137
138
#ifndef ALC_EXT_disconnect
139
#define ALC_EXT_disconnect 1
140
#define ALC_CONNECTED                            0x313
141
#endif
142
143
#ifndef ALC_EXT_thread_local_context
144
#define ALC_EXT_thread_local_context 1
145
typedef ALCboolean  (ALC_APIENTRY*LPALCSETTHREADCONTEXTPROC)(ALCcontext *context);
146
typedef ALCcontext* (ALC_APIENTRY*LPALCGETTHREADCONTEXTPROC)(void);
147
#ifdef AL_ALEXT_PROTOTYPES
148
ALC_API ALCboolean  ALC_APIENTRY alcSetThreadContext(ALCcontext *context);
149
ALC_API ALCcontext* ALC_APIENTRY alcGetThreadContext(void);
150
#endif
151
#endif
152
153
#ifndef AL_EXT_source_distance_model
154
#define AL_EXT_source_distance_model 1
155
#define AL_SOURCE_DISTANCE_MODEL                 0x200
156
#endif
157
158
#ifndef AL_SOFT_buffer_sub_data
159
#define AL_SOFT_buffer_sub_data 1
160
#define AL_BYTE_RW_OFFSETS_SOFT                  0x1031
161
#define AL_SAMPLE_RW_OFFSETS_SOFT                0x1032
162
typedef ALvoid (AL_APIENTRY*LPALBUFFERSUBDATASOFTPROC)(ALuint,ALenum,const ALvoid*,ALsizei,ALsizei);
163
#ifdef AL_ALEXT_PROTOTYPES
164
AL_API ALvoid AL_APIENTRY alBufferSubDataSOFT(ALuint buffer,ALenum format,const ALvoid *data,ALsizei offset,ALsizei length);
165
#endif
166
#endif
167
168
#ifndef AL_SOFT_loop_points
169
#define AL_SOFT_loop_points 1
170
#define AL_LOOP_POINTS_SOFT                      0x2015
171
#endif
172
173
#ifndef AL_EXT_FOLDBACK
174
#define AL_EXT_FOLDBACK 1
175
#define AL_EXT_FOLDBACK_NAME                     "AL_EXT_FOLDBACK"
176
#define AL_FOLDBACK_EVENT_BLOCK                  0x4112
177
#define AL_FOLDBACK_EVENT_START                  0x4111
178
#define AL_FOLDBACK_EVENT_STOP                   0x4113
179
#define AL_FOLDBACK_MODE_MONO                    0x4101
180
#define AL_FOLDBACK_MODE_STEREO                  0x4102
181
typedef void (AL_APIENTRY*LPALFOLDBACKCALLBACK)(ALenum,ALsizei);
182
typedef void (AL_APIENTRY*LPALREQUESTFOLDBACKSTART)(ALenum,ALsizei,ALsizei,ALfloat*,LPALFOLDBACKCALLBACK);
183
typedef void (AL_APIENTRY*LPALREQUESTFOLDBACKSTOP)(void);
184
#ifdef AL_ALEXT_PROTOTYPES
185
AL_API void AL_APIENTRY alRequestFoldbackStart(ALenum mode,ALsizei count,ALsizei length,ALfloat *mem,LPALFOLDBACKCALLBACK callback);
186
AL_API void AL_APIENTRY alRequestFoldbackStop(void);
187
#endif
188
#endif
189
190
#ifndef ALC_EXT_DEDICATED
191
#define ALC_EXT_DEDICATED 1
192
#define AL_DEDICATED_GAIN                        0x0001
193
#define AL_EFFECT_DEDICATED_DIALOGUE             0x9001
194
#define AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT 0x9000
195
#endif
196
197
#ifndef AL_SOFT_buffer_samples
198
#define AL_SOFT_buffer_samples 1
199
/* Channel configurations */
200
#define AL_MONO_SOFT                             0x1500
201
#define AL_STEREO_SOFT                           0x1501
202
#define AL_REAR_SOFT                             0x1502
203
#define AL_QUAD_SOFT                             0x1503
204
#define AL_5POINT1_SOFT                          0x1504
205
#define AL_6POINT1_SOFT                          0x1505
206
#define AL_7POINT1_SOFT                          0x1506
207
208
/* Sample types */
209
#define AL_BYTE_SOFT                             0x1400
210
#define AL_UNSIGNED_BYTE_SOFT                    0x1401
211
#define AL_SHORT_SOFT                            0x1402
212
#define AL_UNSIGNED_SHORT_SOFT                   0x1403
213
#define AL_INT_SOFT                              0x1404
214
#define AL_UNSIGNED_INT_SOFT                     0x1405
215
#define AL_FLOAT_SOFT                            0x1406
216
#define AL_DOUBLE_SOFT                           0x1407
217
#define AL_BYTE3_SOFT                            0x1408
218
#define AL_UNSIGNED_BYTE3_SOFT                   0x1409
219
220
/* Storage formats */
221
#define AL_MONO8_SOFT                            0x1100
222
#define AL_MONO16_SOFT                           0x1101
223
#define AL_MONO32F_SOFT                          0x10010
224
#define AL_STEREO8_SOFT                          0x1102
225
#define AL_STEREO16_SOFT                         0x1103
226
#define AL_STEREO32F_SOFT                        0x10011
227
#define AL_QUAD8_SOFT                            0x1204
228
#define AL_QUAD16_SOFT                           0x1205
229
#define AL_QUAD32F_SOFT                          0x1206
230
#define AL_REAR8_SOFT                            0x1207
231
#define AL_REAR16_SOFT                           0x1208
232
#define AL_REAR32F_SOFT                          0x1209
233
#define AL_5POINT1_8_SOFT                        0x120A
234
#define AL_5POINT1_16_SOFT                       0x120B
235
#define AL_5POINT1_32F_SOFT                      0x120C
236
#define AL_6POINT1_8_SOFT                        0x120D
237
#define AL_6POINT1_16_SOFT                       0x120E
238
#define AL_6POINT1_32F_SOFT                      0x120F
239
#define AL_7POINT1_8_SOFT                        0x1210
240
#define AL_7POINT1_16_SOFT                       0x1211
241
#define AL_7POINT1_32F_SOFT                      0x1212
242
243
/* Buffer attributes */
244
#define AL_INTERNAL_FORMAT_SOFT                  0x2008
245
#define AL_BYTE_LENGTH_SOFT                      0x2009
246
#define AL_SAMPLE_LENGTH_SOFT                    0x200A
247
#define AL_SEC_LENGTH_SOFT                       0x200B
248
249
typedef void (AL_APIENTRY*LPALBUFFERSAMPLESSOFT)(ALuint,ALuint,ALenum,ALsizei,ALenum,ALenum,const ALvoid*);
250
typedef void (AL_APIENTRY*LPALBUFFERSUBSAMPLESSOFT)(ALuint,ALsizei,ALsizei,ALenum,ALenum,const ALvoid*);
251
typedef void (AL_APIENTRY*LPALGETBUFFERSAMPLESSOFT)(ALuint,ALsizei,ALsizei,ALenum,ALenum,ALvoid*);
252
typedef ALboolean (AL_APIENTRY*LPALISBUFFERFORMATSUPPORTEDSOFT)(ALenum);
253
#ifdef AL_ALEXT_PROTOTYPES
254
AL_API void AL_APIENTRY alBufferSamplesSOFT(ALuint buffer, ALuint samplerate, ALenum internalformat, ALsizei samples, ALenum channels, ALenum type, const ALvoid *data);
255
AL_API void AL_APIENTRY alBufferSubSamplesSOFT(ALuint buffer, ALsizei offset, ALsizei samples, ALenum channels, ALenum type, const ALvoid *data);
256
AL_API void AL_APIENTRY alGetBufferSamplesSOFT(ALuint buffer, ALsizei offset, ALsizei samples, ALenum channels, ALenum type, ALvoid *data);
257
AL_API ALboolean AL_APIENTRY alIsBufferFormatSupportedSOFT(ALenum format);
258
#endif
259
#endif
260
261
#ifndef AL_SOFT_direct_channels
262
#define AL_SOFT_direct_channels 1
263
#define AL_DIRECT_CHANNELS_SOFT                  0x1033
264
#endif
265
266
#ifndef ALC_SOFT_loopback
267
#define ALC_SOFT_loopback 1
268
#define ALC_FORMAT_CHANNELS_SOFT                 0x1990
269
#define ALC_FORMAT_TYPE_SOFT                     0x1991
270
271
/* Sample types */
272
#define ALC_BYTE_SOFT                            0x1400
273
#define ALC_UNSIGNED_BYTE_SOFT                   0x1401
274
#define ALC_SHORT_SOFT                           0x1402
275
#define ALC_UNSIGNED_SHORT_SOFT                  0x1403
276
#define ALC_INT_SOFT                             0x1404
277
#define ALC_UNSIGNED_INT_SOFT                    0x1405
278
#define ALC_FLOAT_SOFT                           0x1406
279
280
/* Channel configurations */
281
#define ALC_MONO_SOFT                            0x1500
282
#define ALC_STEREO_SOFT                          0x1501
283
#define ALC_QUAD_SOFT                            0x1503
284
#define ALC_5POINT1_SOFT                         0x1504
285
#define ALC_6POINT1_SOFT                         0x1505
286
#define ALC_7POINT1_SOFT                         0x1506
287
288
typedef ALCdevice* (ALC_APIENTRY*LPALCLOOPBACKOPENDEVICESOFT)(const ALCchar*);
289
typedef ALCboolean (ALC_APIENTRY*LPALCISRENDERFORMATSUPPORTEDSOFT)(ALCdevice*,ALCsizei,ALCenum,ALCenum);
290
typedef void (ALC_APIENTRY*LPALCRENDERSAMPLESSOFT)(ALCdevice*,ALCvoid*,ALCsizei);
291
#ifdef AL_ALEXT_PROTOTYPES
292
ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(const ALCchar *deviceName);
293
ALC_API ALCboolean ALC_APIENTRY alcIsRenderFormatSupportedSOFT(ALCdevice *device, ALCsizei freq, ALCenum channels, ALCenum type);
294
ALC_API void ALC_APIENTRY alcRenderSamplesSOFT(ALCdevice *device, ALCvoid *buffer, ALCsizei samples);
295
#endif
100
#endif
296
#endif
101
297
102
#ifdef __cplusplus
298
#ifdef __cplusplus
(-)a/make/stub_includes/openal/efx.h (-700 / +710 lines)
Lines 1-748 Link Here
1
#ifndef __efx_h_
1
#ifndef AL_EFX_H
2
#define __efx_h_
2
#define AL_EFX_H
3
3
4
/**
5
 * OpenAL cross platform effects extension audio library
6
 * Copyright (C) 2005-2006 by authors.
7
 * This library is free software; you can redistribute it and/or
8
 *  modify it under the terms of the GNU Library General Public
9
 *  License as published by the Free Software Foundation; either
10
 *  version 2 of the License, or (at your option) any later version.
11
 *
12
 * This library is distributed in the hope that it will be useful,
13
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
 *  Library General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU Library General Public
18
 *  License along with this library; if not, write to the
19
 *  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
 *  Boston, MA  02111-1307, USA.
21
 * Or go to http://www.gnu.org/copyleft/lgpl.html
22
 */
23
4
24
#ifdef __cplusplus
5
#ifdef __cplusplus
25
extern "C" {
6
extern "C" {
26
#endif
7
#endif
27
8
28
#define ALC_EXT_EFX_NAME                                   "ALC_EXT_EFX"
9
#define ALC_EXT_EFX_NAME                         "ALC_EXT_EFX"
29
10
30
/**
11
#define ALC_EFX_MAJOR_VERSION                    0x20001
31
 * Context definitions to be used with alcCreateContext.
12
#define ALC_EFX_MINOR_VERSION                    0x20002
32
 * These values must be unique and not conflict with other 
13
#define ALC_MAX_AUXILIARY_SENDS                  0x20003
33
 * al context values.
14
34
 */
15
35
#define ALC_EFX_MAJOR_VERSION                              0x20001
16
/* Listener properties. */
36
#define ALC_EFX_MINOR_VERSION                              0x20002
17
#define AL_METERS_PER_UNIT                       0x20004
37
#define ALC_MAX_AUXILIARY_SENDS                            0x20003
18
38
19
/* Source properties. */
39
20
#define AL_DIRECT_FILTER                         0x20005
40
21
#define AL_AUXILIARY_SEND_FILTER                 0x20006
41
22
#define AL_AIR_ABSORPTION_FACTOR                 0x20007
42
/**
23
#define AL_ROOM_ROLLOFF_FACTOR                   0x20008
43
 * Listener definitions to be used with alListener functions.
24
#define AL_CONE_OUTER_GAINHF                     0x20009
44
 * These values must be unique and not conflict with other 
25
#define AL_DIRECT_FILTER_GAINHF_AUTO             0x2000A
45
 * al listener values.
26
#define AL_AUXILIARY_SEND_FILTER_GAIN_AUTO       0x2000B
46
 */
27
#define AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO     0x2000C
47
#define AL_METERS_PER_UNIT                                 0x20004
28
48
29
49
30
/* Effect properties. */
50
31
51
32
/* Reverb effect parameters */
52
/**
33
#define AL_REVERB_DENSITY                        0x0001
53
 * Source definitions to be used with alSource functions.
34
#define AL_REVERB_DIFFUSION                      0x0002
54
 * These values must be unique and not conflict with other 
35
#define AL_REVERB_GAIN                           0x0003
55
 * al source values.
36
#define AL_REVERB_GAINHF                         0x0004
56
 */
37
#define AL_REVERB_DECAY_TIME                     0x0005
57
#define AL_DIRECT_FILTER                                   0x20005
38
#define AL_REVERB_DECAY_HFRATIO                  0x0006
58
#define AL_AUXILIARY_SEND_FILTER                           0x20006
39
#define AL_REVERB_REFLECTIONS_GAIN               0x0007
59
#define AL_AIR_ABSORPTION_FACTOR                           0x20007
40
#define AL_REVERB_REFLECTIONS_DELAY              0x0008
60
#define AL_ROOM_ROLLOFF_FACTOR                             0x20008
41
#define AL_REVERB_LATE_REVERB_GAIN               0x0009
61
#define AL_CONE_OUTER_GAINHF                               0x20009
42
#define AL_REVERB_LATE_REVERB_DELAY              0x000A
62
#define AL_DIRECT_FILTER_GAINHF_AUTO                       0x2000A
43
#define AL_REVERB_AIR_ABSORPTION_GAINHF          0x000B
63
#define AL_AUXILIARY_SEND_FILTER_GAIN_AUTO                 0x2000B
44
#define AL_REVERB_ROOM_ROLLOFF_FACTOR            0x000C
64
#define AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO               0x2000C
45
#define AL_REVERB_DECAY_HFLIMIT                  0x000D
65
46
66
47
/* EAX Reverb effect parameters */
67
48
#define AL_EAXREVERB_DENSITY                     0x0001
68
49
#define AL_EAXREVERB_DIFFUSION                   0x0002
69
/**
50
#define AL_EAXREVERB_GAIN                        0x0003
70
 * Effect object definitions to be used with alEffect functions.
51
#define AL_EAXREVERB_GAINHF                      0x0004
71
 *
52
#define AL_EAXREVERB_GAINLF                      0x0005
72
 * Effect parameter value definitions, ranges, and defaults
53
#define AL_EAXREVERB_DECAY_TIME                  0x0006
73
 * appear farther down in this file.
54
#define AL_EAXREVERB_DECAY_HFRATIO               0x0007
74
 */
55
#define AL_EAXREVERB_DECAY_LFRATIO               0x0008
75
56
#define AL_EAXREVERB_REFLECTIONS_GAIN            0x0009
76
/* Reverb Parameters */
57
#define AL_EAXREVERB_REFLECTIONS_DELAY           0x000A
77
#define AL_REVERB_DENSITY                                  0x0001
58
#define AL_EAXREVERB_REFLECTIONS_PAN             0x000B
78
#define AL_REVERB_DIFFUSION                                0x0002
59
#define AL_EAXREVERB_LATE_REVERB_GAIN            0x000C
79
#define AL_REVERB_GAIN                                     0x0003
60
#define AL_EAXREVERB_LATE_REVERB_DELAY           0x000D
80
#define AL_REVERB_GAINHF                                   0x0004
61
#define AL_EAXREVERB_LATE_REVERB_PAN             0x000E
81
#define AL_REVERB_DECAY_TIME                               0x0005
62
#define AL_EAXREVERB_ECHO_TIME                   0x000F
82
#define AL_REVERB_DECAY_HFRATIO                            0x0006
63
#define AL_EAXREVERB_ECHO_DEPTH                  0x0010
83
#define AL_REVERB_REFLECTIONS_GAIN                         0x0007
64
#define AL_EAXREVERB_MODULATION_TIME             0x0011
84
#define AL_REVERB_REFLECTIONS_DELAY                        0x0008
65
#define AL_EAXREVERB_MODULATION_DEPTH            0x0012
85
#define AL_REVERB_LATE_REVERB_GAIN                         0x0009
66
#define AL_EAXREVERB_AIR_ABSORPTION_GAINHF       0x0013
86
#define AL_REVERB_LATE_REVERB_DELAY                        0x000A
67
#define AL_EAXREVERB_HFREFERENCE                 0x0014
87
#define AL_REVERB_AIR_ABSORPTION_GAINHF                    0x000B 
68
#define AL_EAXREVERB_LFREFERENCE                 0x0015
88
#define AL_REVERB_ROOM_ROLLOFF_FACTOR                      0x000C
69
#define AL_EAXREVERB_ROOM_ROLLOFF_FACTOR         0x0016
89
#define AL_REVERB_DECAY_HFLIMIT                            0x000D
70
#define AL_EAXREVERB_DECAY_HFLIMIT               0x0017
90
71
91
/* Chorus Parameters */
72
/* Chorus effect parameters */
92
#define AL_CHORUS_WAVEFORM                                 0x0001
73
#define AL_CHORUS_WAVEFORM                       0x0001
93
#define AL_CHORUS_PHASE                                    0x0002
74
#define AL_CHORUS_PHASE                          0x0002
94
#define AL_CHORUS_RATE                                     0x0003
75
#define AL_CHORUS_RATE                           0x0003
95
#define AL_CHORUS_DEPTH                                    0x0004
76
#define AL_CHORUS_DEPTH                          0x0004
96
#define AL_CHORUS_FEEDBACK                                 0x0005
77
#define AL_CHORUS_FEEDBACK                       0x0005
97
#define AL_CHORUS_DELAY                                    0x0006
78
#define AL_CHORUS_DELAY                          0x0006
98
79
99
/* Distortion Parameters */
80
/* Distortion effect parameters */
100
#define AL_DISTORTION_EDGE                                 0x0001
81
#define AL_DISTORTION_EDGE                       0x0001
101
#define AL_DISTORTION_GAIN                                 0x0002
82
#define AL_DISTORTION_GAIN                       0x0002
102
#define AL_DISTORTION_LOWPASS_CUTOFF                       0x0003
83
#define AL_DISTORTION_LOWPASS_CUTOFF             0x0003
103
#define AL_DISTORTION_EQCENTER                             0x0004
84
#define AL_DISTORTION_EQCENTER                   0x0004
104
#define AL_DISTORTION_EQBANDWIDTH                          0x0005
85
#define AL_DISTORTION_EQBANDWIDTH                0x0005
105
86
106
/* Echo Parameters */
87
/* Echo effect parameters */
107
#define AL_ECHO_DELAY                                      0x0001
88
#define AL_ECHO_DELAY                            0x0001
108
#define AL_ECHO_LRDELAY                                    0x0002
89
#define AL_ECHO_LRDELAY                          0x0002
109
#define AL_ECHO_DAMPING                                    0x0003
90
#define AL_ECHO_DAMPING                          0x0003
110
#define AL_ECHO_FEEDBACK                                   0x0004
91
#define AL_ECHO_FEEDBACK                         0x0004
111
#define AL_ECHO_SPREAD                                     0x0005
92
#define AL_ECHO_SPREAD                           0x0005
112
93
113
/* Flanger Parameters */
94
/* Flanger effect parameters */
114
#define AL_FLANGER_WAVEFORM                                0x0001
95
#define AL_FLANGER_WAVEFORM                      0x0001
115
#define AL_FLANGER_PHASE                                   0x0002
96
#define AL_FLANGER_PHASE                         0x0002
116
#define AL_FLANGER_RATE                                    0x0003
97
#define AL_FLANGER_RATE                          0x0003
117
#define AL_FLANGER_DEPTH                                   0x0004
98
#define AL_FLANGER_DEPTH                         0x0004
118
#define AL_FLANGER_FEEDBACK                                0x0005
99
#define AL_FLANGER_FEEDBACK                      0x0005
119
#define AL_FLANGER_DELAY                                   0x0006
100
#define AL_FLANGER_DELAY                         0x0006
120
101
121
/* Frequencyshifter Parameters */
102
/* Frequency shifter effect parameters */
122
#define AL_FREQUENCY_SHIFTER_FREQUENCY                     0x0001
103
#define AL_FREQUENCY_SHIFTER_FREQUENCY           0x0001
123
#define AL_FREQUENCY_SHIFTER_LEFT_DIRECTION                0x0002
104
#define AL_FREQUENCY_SHIFTER_LEFT_DIRECTION      0x0002
124
#define AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION               0x0003
105
#define AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION     0x0003
125
106
126
/* Vocalmorpher Parameters */
107
/* Vocal morpher effect parameters */
127
#define AL_VOCAL_MORPHER_PHONEMEA                          0x0001
108
#define AL_VOCAL_MORPHER_PHONEMEA                0x0001
128
#define AL_VOCAL_MORPHER_PHONEMEA_COARSE_TUNING            0x0002
109
#define AL_VOCAL_MORPHER_PHONEMEA_COARSE_TUNING  0x0002
129
#define AL_VOCAL_MORPHER_PHONEMEB                          0x0003
110
#define AL_VOCAL_MORPHER_PHONEMEB                0x0003
130
#define AL_VOCAL_MORPHER_PHONEMEB_COARSE_TUNING            0x0004
111
#define AL_VOCAL_MORPHER_PHONEMEB_COARSE_TUNING  0x0004
131
#define AL_VOCAL_MORPHER_WAVEFORM                          0x0005
112
#define AL_VOCAL_MORPHER_WAVEFORM                0x0005
132
#define AL_VOCAL_MORPHER_RATE                              0x0006
113
#define AL_VOCAL_MORPHER_RATE                    0x0006
133
114
134
/* Pitchshifter Parameters */
115
/* Pitchshifter effect parameters */
135
#define AL_PITCH_SHIFTER_COARSE_TUNE                       0x0001
116
#define AL_PITCH_SHIFTER_COARSE_TUNE             0x0001
136
#define AL_PITCH_SHIFTER_FINE_TUNE                         0x0002
117
#define AL_PITCH_SHIFTER_FINE_TUNE               0x0002
137
118
138
/* Ringmodulator Parameters */
119
/* Ringmodulator effect parameters */
139
#define AL_RING_MODULATOR_FREQUENCY                        0x0001
120
#define AL_RING_MODULATOR_FREQUENCY              0x0001
140
#define AL_RING_MODULATOR_HIGHPASS_CUTOFF                  0x0002
121
#define AL_RING_MODULATOR_HIGHPASS_CUTOFF        0x0002
141
#define AL_RING_MODULATOR_WAVEFORM                         0x0003
122
#define AL_RING_MODULATOR_WAVEFORM               0x0003
142
123
143
/* Autowah Parameters */
124
/* Autowah effect parameters */
144
#define AL_AUTOWAH_ATTACK_TIME                             0x0001
125
#define AL_AUTOWAH_ATTACK_TIME                   0x0001
145
#define AL_AUTOWAH_RELEASE_TIME                            0x0002
126
#define AL_AUTOWAH_RELEASE_TIME                  0x0002
146
#define AL_AUTOWAH_RESONANCE                               0x0003
127
#define AL_AUTOWAH_RESONANCE                     0x0003
147
#define AL_AUTOWAH_PEAK_GAIN                               0x0004
128
#define AL_AUTOWAH_PEAK_GAIN                     0x0004
148
129
149
/* Compressor Parameters */
130
/* Compressor effect parameters */
150
#define AL_COMPRESSOR_ONOFF                                0x0001
131
#define AL_COMPRESSOR_ONOFF                      0x0001
151
132
152
/* Equalizer Parameters */
133
/* Equalizer effect parameters */
153
#define AL_EQUALIZER_LOW_GAIN                              0x0001
134
#define AL_EQUALIZER_LOW_GAIN                    0x0001
154
#define AL_EQUALIZER_LOW_CUTOFF                            0x0002
135
#define AL_EQUALIZER_LOW_CUTOFF                  0x0002
155
#define AL_EQUALIZER_MID1_GAIN                             0x0003
136
#define AL_EQUALIZER_MID1_GAIN                   0x0003
156
#define AL_EQUALIZER_MID1_CENTER                           0x0004
137
#define AL_EQUALIZER_MID1_CENTER                 0x0004
157
#define AL_EQUALIZER_MID1_WIDTH                            0x0005
138
#define AL_EQUALIZER_MID1_WIDTH                  0x0005
158
#define AL_EQUALIZER_MID2_GAIN                             0x0006
139
#define AL_EQUALIZER_MID2_GAIN                   0x0006
159
#define AL_EQUALIZER_MID2_CENTER                           0x0007
140
#define AL_EQUALIZER_MID2_CENTER                 0x0007
160
#define AL_EQUALIZER_MID2_WIDTH                            0x0008
141
#define AL_EQUALIZER_MID2_WIDTH                  0x0008
161
#define AL_EQUALIZER_HIGH_GAIN                             0x0009
142
#define AL_EQUALIZER_HIGH_GAIN                   0x0009
162
#define AL_EQUALIZER_HIGH_CUTOFF                           0x000A
143
#define AL_EQUALIZER_HIGH_CUTOFF                 0x000A
163
144
164
/* Effect type */
145
/* Effect type */
165
#define AL_EFFECT_FIRST_PARAMETER                          0x0000
146
#define AL_EFFECT_FIRST_PARAMETER                0x0000
166
#define AL_EFFECT_LAST_PARAMETER                           0x8000
147
#define AL_EFFECT_LAST_PARAMETER                 0x8000
167
#define AL_EFFECT_TYPE                                     0x8001
148
#define AL_EFFECT_TYPE                           0x8001
168
149
169
/* Effect type definitions to be used with AL_EFFECT_TYPE. */
150
/* Effect types, used with the AL_EFFECT_TYPE property */
170
#define AL_EFFECT_NULL                                     0x0000  /* Can also be used as an Effect Object ID */
151
#define AL_EFFECT_NULL                           0x0000
171
#define AL_EFFECT_REVERB                                   0x0001
152
#define AL_EFFECT_REVERB                         0x0001
172
#define AL_EFFECT_CHORUS                                   0x0002
153
#define AL_EFFECT_CHORUS                         0x0002
173
#define AL_EFFECT_DISTORTION                               0x0003
154
#define AL_EFFECT_DISTORTION                     0x0003
174
#define AL_EFFECT_ECHO                                     0x0004
155
#define AL_EFFECT_ECHO                           0x0004
175
#define AL_EFFECT_FLANGER                                  0x0005
156
#define AL_EFFECT_FLANGER                        0x0005
176
#define AL_EFFECT_FREQUENCY_SHIFTER                        0x0006
157
#define AL_EFFECT_FREQUENCY_SHIFTER              0x0006
177
#define AL_EFFECT_VOCAL_MORPHER                            0x0007
158
#define AL_EFFECT_VOCAL_MORPHER                  0x0007
178
#define AL_EFFECT_PITCH_SHIFTER                            0x0008
159
#define AL_EFFECT_PITCH_SHIFTER                  0x0008
179
#define AL_EFFECT_RING_MODULATOR                           0x0009
160
#define AL_EFFECT_RING_MODULATOR                 0x0009
180
#define AL_EFFECT_AUTOWAH                                  0x000A
161
#define AL_EFFECT_AUTOWAH                        0x000A
181
#define AL_EFFECT_COMPRESSOR                               0x000B
162
#define AL_EFFECT_COMPRESSOR                     0x000B
182
#define AL_EFFECT_EQUALIZER                                0x000C
163
#define AL_EFFECT_EQUALIZER                      0x000C
183
164
#define AL_EFFECT_EAXREVERB                      0x8000
184
/**
165
185
 * Auxiliary Slot object definitions to be used with alAuxiliaryEffectSlot functions.
166
/* Auxiliary Effect Slot properties. */
186
 */
167
#define AL_EFFECTSLOT_EFFECT                     0x0001
187
#define AL_EFFECTSLOT_EFFECT                               0x0001
168
#define AL_EFFECTSLOT_GAIN                       0x0002
188
#define AL_EFFECTSLOT_GAIN                                 0x0002
169
#define AL_EFFECTSLOT_AUXILIARY_SEND_AUTO        0x0003
189
#define AL_EFFECTSLOT_AUXILIARY_SEND_AUTO                  0x0003
170
190
171
/* NULL Auxiliary Slot ID to disable a source send. */
191
/**
172
#define AL_EFFECTSLOT_NULL                       0x0000
192
 * Value to be used as an Auxiliary Slot ID to disable a source send..
173
193
 */
174
194
#define AL_EFFECTSLOT_NULL                                 0x0000
175
/* Filter properties. */
195
176
196
177
/* Lowpass filter parameters */
197
178
#define AL_LOWPASS_GAIN                          0x0001
198
/**
179
#define AL_LOWPASS_GAINHF                        0x0002
199
 * Filter object definitions to be used with alFilter functions.
180
200
 */
181
/* Highpass filter parameters */
201
182
#define AL_HIGHPASS_GAIN                         0x0001
202
/* Lowpass parameters. */
183
#define AL_HIGHPASS_GAINLF                       0x0002
203
#define AL_LOWPASS_GAIN                                    0x0001
184
204
#define AL_LOWPASS_GAINHF                                  0x0002
185
/* Bandpass filter parameters */
205
186
#define AL_BANDPASS_GAIN                         0x0001
206
/* Highpass Parameters */
187
#define AL_BANDPASS_GAINLF                       0x0002
207
#define AL_HIGHPASS_GAIN                                   0x0001
188
#define AL_BANDPASS_GAINHF                       0x0003
208
#define AL_HIGHPASS_GAINLF                                 0x0002
209
210
/* Bandpass Parameters */
211
#define AL_BANDPASS_GAIN                                   0x0001
212
#define AL_BANDPASS_GAINLF                                 0x0002
213
#define AL_BANDPASS_GAINHF                                 0x0003
214
189
215
/* Filter type */
190
/* Filter type */
216
#define AL_FILTER_FIRST_PARAMETER                          0x0000
191
#define AL_FILTER_FIRST_PARAMETER                0x0000
217
#define AL_FILTER_LAST_PARAMETER                           0x8000
192
#define AL_FILTER_LAST_PARAMETER                 0x8000
218
#define AL_FILTER_TYPE                                     0x8001
193
#define AL_FILTER_TYPE                           0x8001
219
194
220
/* Filter type definitions to be used with AL_FILTER_TYPE. */
195
/* Filter types, used with the AL_FILTER_TYPE property */
221
#define AL_FILTER_NULL                                     0x0000  /* Can also be used as a Filter Object ID */
196
#define AL_FILTER_NULL                           0x0000
222
#define AL_FILTER_LOWPASS                                  0x0001
197
#define AL_FILTER_LOWPASS                        0x0001
223
#define AL_FILTER_HIGHPASS                                 0x0002
198
#define AL_FILTER_HIGHPASS                       0x0002
224
#define AL_FILTER_BANDPASS                                 0x0003
199
#define AL_FILTER_BANDPASS                       0x0003
225
200
226
201
227
/**
202
/* Effect object function types. */
228
 * Effect object functions.
203
typedef void (AL_APIENTRY *LPALGENEFFECTS)(ALsizei, ALuint*);
229
 */
204
typedef void (AL_APIENTRY *LPALDELETEEFFECTS)(ALsizei, const ALuint*);
230
205
typedef ALboolean (AL_APIENTRY *LPALISEFFECT)(ALuint);
231
/* Create Effect objects. */
206
typedef void (AL_APIENTRY *LPALEFFECTI)(ALuint, ALenum, ALint);
232
typedef void (__cdecl *LPALGENEFFECTS)( ALsizei n, ALuint* effects );
207
typedef void (AL_APIENTRY *LPALEFFECTIV)(ALuint, ALenum, const ALint*);
233
void alGenEffects( ALsizei n, ALuint* effects );
208
typedef void (AL_APIENTRY *LPALEFFECTF)(ALuint, ALenum, ALfloat);
234
209
typedef void (AL_APIENTRY *LPALEFFECTFV)(ALuint, ALenum, const ALfloat*);
235
/* Delete Effect objects. */
210
typedef void (AL_APIENTRY *LPALGETEFFECTI)(ALuint, ALenum, ALint*);
236
typedef void (__cdecl *LPALDELETEEFFECTS)( ALsizei n, ALuint* effects );
211
typedef void (AL_APIENTRY *LPALGETEFFECTIV)(ALuint, ALenum, ALint*);
237
void alDeleteEffects( ALsizei n, ALuint* effects );
212
typedef void (AL_APIENTRY *LPALGETEFFECTF)(ALuint, ALenum, ALfloat*);
238
213
typedef void (AL_APIENTRY *LPALGETEFFECTFV)(ALuint, ALenum, ALfloat*);
239
/* Verify a handle is a valid Effect. */ 
214
240
typedef ALboolean (__cdecl *LPALISEFFECT)( ALuint eid );
215
/* Filter object function types. */
241
ALboolean alIsEffect( ALuint eid );
216
typedef void (AL_APIENTRY *LPALGENFILTERS)(ALsizei, ALuint*);
242
217
typedef void (AL_APIENTRY *LPALDELETEFILTERS)(ALsizei, const ALuint*);
243
/* Set an integer parameter for an Effect object. */
218
typedef ALboolean (AL_APIENTRY *LPALISFILTER)(ALuint);
244
typedef void (__cdecl *LPALEFFECTI)( ALuint eid, ALenum param, ALint value); 
219
typedef void (AL_APIENTRY *LPALFILTERI)(ALuint, ALenum, ALint);
245
void alEffecti( ALuint eid, ALenum param, ALint value); 
220
typedef void (AL_APIENTRY *LPALFILTERIV)(ALuint, ALenum, const ALint*);
246
typedef void (__cdecl *LPALEFFECTIV)( ALuint eid, ALenum param, ALint* values ); 
221
typedef void (AL_APIENTRY *LPALFILTERF)(ALuint, ALenum, ALfloat);
247
void alEffectiv( ALuint eid, ALenum param, ALint* values ); 
222
typedef void (AL_APIENTRY *LPALFILTERFV)(ALuint, ALenum, const ALfloat*);
248
223
typedef void (AL_APIENTRY *LPALGETFILTERI)(ALuint, ALenum, ALint*);
249
/* Set a floating point parameter for an Effect object. */
224
typedef void (AL_APIENTRY *LPALGETFILTERIV)(ALuint, ALenum, ALint*);
250
typedef void (__cdecl *LPALEFFECTF)( ALuint eid, ALenum param, ALfloat value); 
225
typedef void (AL_APIENTRY *LPALGETFILTERF)(ALuint, ALenum, ALfloat*);
251
void alEffectf( ALuint eid, ALenum param, ALfloat value); 
226
typedef void (AL_APIENTRY *LPALGETFILTERFV)(ALuint, ALenum, ALfloat*);
252
typedef void (__cdecl *LPALEFFECTFV)( ALuint eid, ALenum param, ALfloat* values ); 
227
253
void alEffectfv( ALuint eid, ALenum param, ALfloat* values ); 
228
/* Auxiliary Effect Slot object function types. */
254
229
typedef void (AL_APIENTRY *LPALGENAUXILIARYEFFECTSLOTS)(ALsizei, ALuint*);
255
/* Get an integer parameter for an Effect object. */
230
typedef void (AL_APIENTRY *LPALDELETEAUXILIARYEFFECTSLOTS)(ALsizei, const ALuint*);
256
typedef void (__cdecl *LPALGETEFFECTI)( ALuint eid, ALenum pname, ALint* value );
231
typedef ALboolean (AL_APIENTRY *LPALISAUXILIARYEFFECTSLOT)(ALuint);
257
void alGetEffecti( ALuint eid, ALenum pname, ALint* value );
232
typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTI)(ALuint, ALenum, ALint);
258
typedef void (__cdecl *LPALGETEFFECTIV)( ALuint eid, ALenum pname, ALint* values );
233
typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTIV)(ALuint, ALenum, const ALint*);
259
void alGetEffectiv( ALuint eid, ALenum pname, ALint* values );
234
typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTF)(ALuint, ALenum, ALfloat);
260
235
typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTFV)(ALuint, ALenum, const ALfloat*);
261
/* Get a floating point parameter for an Effect object. */
236
typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTI)(ALuint, ALenum, ALint*);
262
typedef void (__cdecl *LPALGETEFFECTF)( ALuint eid, ALenum pname, ALfloat* value );
237
typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTIV)(ALuint, ALenum, ALint*);
263
void alGetEffectf( ALuint eid, ALenum pname, ALfloat* value );
238
typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTF)(ALuint, ALenum, ALfloat*);
264
typedef void (__cdecl *LPALGETEFFECTFV)( ALuint eid, ALenum pname, ALfloat* values );
239
typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTFV)(ALuint, ALenum, ALfloat*);
265
void alGetEffectfv( ALuint eid, ALenum pname, ALfloat* values );
240
266
241
#ifdef AL_ALEXT_PROTOTYPES
267
242
AL_API ALvoid AL_APIENTRY alGenEffects(ALsizei n, ALuint *effects);
268
/**
243
AL_API ALvoid AL_APIENTRY alDeleteEffects(ALsizei n, const ALuint *effects);
269
 * Filter object functions
244
AL_API ALboolean AL_APIENTRY alIsEffect(ALuint effect);
270
 */
245
AL_API ALvoid AL_APIENTRY alEffecti(ALuint effect, ALenum param, ALint iValue);
271
246
AL_API ALvoid AL_APIENTRY alEffectiv(ALuint effect, ALenum param, const ALint *piValues);
272
/* Create Filter objects. */
247
AL_API ALvoid AL_APIENTRY alEffectf(ALuint effect, ALenum param, ALfloat flValue);
273
typedef void (__cdecl *LPALGENFILTERS)( ALsizei n, ALuint* filters ); 
248
AL_API ALvoid AL_APIENTRY alEffectfv(ALuint effect, ALenum param, const ALfloat *pflValues);
274
void alGenFilters( ALsizei n, ALuint* filters ); 
249
AL_API ALvoid AL_APIENTRY alGetEffecti(ALuint effect, ALenum param, ALint *piValue);
275
250
AL_API ALvoid AL_APIENTRY alGetEffectiv(ALuint effect, ALenum param, ALint *piValues);
276
/* Delete Filter objects. */
251
AL_API ALvoid AL_APIENTRY alGetEffectf(ALuint effect, ALenum param, ALfloat *pflValue);
277
typedef void (__cdecl *LPALDELETEFILTERS)( ALsizei n, ALuint* filters );
252
AL_API ALvoid AL_APIENTRY alGetEffectfv(ALuint effect, ALenum param, ALfloat *pflValues);
278
void alDeleteFilters( ALsizei n, ALuint* filters );
253
279
254
AL_API ALvoid AL_APIENTRY alGenFilters(ALsizei n, ALuint *filters);
280
/* Verify a handle is a valid Filter. */ 
255
AL_API ALvoid AL_APIENTRY alDeleteFilters(ALsizei n, const ALuint *filters);
281
typedef ALboolean (__cdecl *LPALISFILTER)( ALuint fid );
256
AL_API ALboolean AL_APIENTRY alIsFilter(ALuint filter);
282
ALboolean alIsFilter( ALuint fid );
257
AL_API ALvoid AL_APIENTRY alFilteri(ALuint filter, ALenum param, ALint iValue);
283
258
AL_API ALvoid AL_APIENTRY alFilteriv(ALuint filter, ALenum param, const ALint *piValues);
284
/* Set an integer parameter for a Filter object. */
259
AL_API ALvoid AL_APIENTRY alFilterf(ALuint filter, ALenum param, ALfloat flValue);
285
typedef void (__cdecl *LPALFILTERI)( ALuint fid, ALenum param, ALint value ); 
260
AL_API ALvoid AL_APIENTRY alFilterfv(ALuint filter, ALenum param, const ALfloat *pflValues);
286
void alFilteri( ALuint fid, ALenum param, ALint value ); 
261
AL_API ALvoid AL_APIENTRY alGetFilteri(ALuint filter, ALenum param, ALint *piValue);
287
typedef void (__cdecl *LPALFILTERIV)( ALuint fid, ALenum param, ALint* values ); 
262
AL_API ALvoid AL_APIENTRY alGetFilteriv(ALuint filter, ALenum param, ALint *piValues);
288
void alFilteriv( ALuint fid, ALenum param, ALint* values ); 
263
AL_API ALvoid AL_APIENTRY alGetFilterf(ALuint filter, ALenum param, ALfloat *pflValue);
289
264
AL_API ALvoid AL_APIENTRY alGetFilterfv(ALuint filter, ALenum param, ALfloat *pflValues);
290
/* Set a floating point parameter for an Filter object. */
265
291
typedef void (__cdecl *LPALFILTERF)( ALuint fid, ALenum param, ALfloat value); 
266
AL_API ALvoid AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslots);
292
void alFilterf( ALuint fid, ALenum param, ALfloat value); 
267
AL_API ALvoid AL_APIENTRY alDeleteAuxiliaryEffectSlots(ALsizei n, const ALuint *effectslots);
293
typedef void (__cdecl *LPALFILTERFV)( ALuint fid, ALenum param, ALfloat* values ); 
268
AL_API ALboolean AL_APIENTRY alIsAuxiliaryEffectSlot(ALuint effectslot);
294
void alFilterfv( ALuint fid, ALenum param, ALfloat* values ); 
269
AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSloti(ALuint effectslot, ALenum param, ALint iValue);
295
270
AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotiv(ALuint effectslot, ALenum param, const ALint *piValues);
296
/* Get an integer parameter for a Filter object. */
271
AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat flValue);
297
typedef void (__cdecl *LPALGETFILTERI)( ALuint fid, ALenum pname, ALint* value );
272
AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotfv(ALuint effectslot, ALenum param, const ALfloat *pflValues);
298
void alGetFilteri( ALuint fid, ALenum pname, ALint* value );
273
AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSloti(ALuint effectslot, ALenum param, ALint *piValue);
299
typedef void (__cdecl *LPALGETFILTERIV)( ALuint fid, ALenum pname, ALint* values );
274
AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotiv(ALuint effectslot, ALenum param, ALint *piValues);
300
void alGetFilteriv( ALuint fid, ALenum pname, ALint* values );
275
AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat *pflValue);
276
AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotfv(ALuint effectslot, ALenum param, ALfloat *pflValues);
277
#endif
278
279
/* Filter ranges and defaults. */
280
281
/* Lowpass filter */
282
#define AL_LOWPASS_MIN_GAIN                      (0.0f)
283
#define AL_LOWPASS_MAX_GAIN                      (1.0f)
284
#define AL_LOWPASS_DEFAULT_GAIN                  (1.0f)
285
286
#define AL_LOWPASS_MIN_GAINHF                    (0.0f)
287
#define AL_LOWPASS_MAX_GAINHF                    (1.0f)
288
#define AL_LOWPASS_DEFAULT_GAINHF                (1.0f)
289
290
/* Highpass filter */
291
#define AL_HIGHPASS_MIN_GAIN                     (0.0f)
292
#define AL_HIGHPASS_MAX_GAIN                     (1.0f)
293
#define AL_HIGHPASS_DEFAULT_GAIN                 (1.0f)
294
295
#define AL_HIGHPASS_MIN_GAINLF                   (0.0f)
296
#define AL_HIGHPASS_MAX_GAINLF                   (1.0f)
297
#define AL_HIGHPASS_DEFAULT_GAINLF               (1.0f)
298
299
/* Bandpass filter */
300
#define AL_BANDPASS_MIN_GAIN                     (0.0f)
301
#define AL_BANDPASS_MAX_GAIN                     (1.0f)
302
#define AL_BANDPASS_DEFAULT_GAIN                 (1.0f)
303
304
#define AL_BANDPASS_MIN_GAINHF                   (0.0f)
305
#define AL_BANDPASS_MAX_GAINHF                   (1.0f)
306
#define AL_BANDPASS_DEFAULT_GAINHF               (1.0f)
307
308
#define AL_BANDPASS_MIN_GAINLF                   (0.0f)
309
#define AL_BANDPASS_MAX_GAINLF                   (1.0f)
310
#define AL_BANDPASS_DEFAULT_GAINLF               (1.0f)
311
312
313
/* Effect parameter ranges and defaults. */
314
315
/* Standard reverb effect */
316
#define AL_REVERB_MIN_DENSITY                    (0.0f)
317
#define AL_REVERB_MAX_DENSITY                    (1.0f)
318
#define AL_REVERB_DEFAULT_DENSITY                (1.0f)
319
320
#define AL_REVERB_MIN_DIFFUSION                  (0.0f)
321
#define AL_REVERB_MAX_DIFFUSION                  (1.0f)
322
#define AL_REVERB_DEFAULT_DIFFUSION              (1.0f)
323
324
#define AL_REVERB_MIN_GAIN                       (0.0f)
325
#define AL_REVERB_MAX_GAIN                       (1.0f)
326
#define AL_REVERB_DEFAULT_GAIN                   (0.32f)
327
328
#define AL_REVERB_MIN_GAINHF                     (0.0f)
329
#define AL_REVERB_MAX_GAINHF                     (1.0f)
330
#define AL_REVERB_DEFAULT_GAINHF                 (0.89f)
331
332
#define AL_REVERB_MIN_DECAY_TIME                 (0.1f)
333
#define AL_REVERB_MAX_DECAY_TIME                 (20.0f)
334
#define AL_REVERB_DEFAULT_DECAY_TIME             (1.49f)
335
336
#define AL_REVERB_MIN_DECAY_HFRATIO              (0.1f)
337
#define AL_REVERB_MAX_DECAY_HFRATIO              (2.0f)
338
#define AL_REVERB_DEFAULT_DECAY_HFRATIO          (0.83f)
339
340
#define AL_REVERB_MIN_REFLECTIONS_GAIN           (0.0f)
341
#define AL_REVERB_MAX_REFLECTIONS_GAIN           (3.16f)
342
#define AL_REVERB_DEFAULT_REFLECTIONS_GAIN       (0.05f)
343
344
#define AL_REVERB_MIN_REFLECTIONS_DELAY          (0.0f)
345
#define AL_REVERB_MAX_REFLECTIONS_DELAY          (0.3f)
346
#define AL_REVERB_DEFAULT_REFLECTIONS_DELAY      (0.007f)
347
348
#define AL_REVERB_MIN_LATE_REVERB_GAIN           (0.0f)
349
#define AL_REVERB_MAX_LATE_REVERB_GAIN           (10.0f)
350
#define AL_REVERB_DEFAULT_LATE_REVERB_GAIN       (1.26f)
351
352
#define AL_REVERB_MIN_LATE_REVERB_DELAY          (0.0f)
353
#define AL_REVERB_MAX_LATE_REVERB_DELAY          (0.1f)
354
#define AL_REVERB_DEFAULT_LATE_REVERB_DELAY      (0.011f)
355
356
#define AL_REVERB_MIN_AIR_ABSORPTION_GAINHF      (0.892f)
357
#define AL_REVERB_MAX_AIR_ABSORPTION_GAINHF      (1.0f)
358
#define AL_REVERB_DEFAULT_AIR_ABSORPTION_GAINHF  (0.994f)
359
360
#define AL_REVERB_MIN_ROOM_ROLLOFF_FACTOR        (0.0f)
361
#define AL_REVERB_MAX_ROOM_ROLLOFF_FACTOR        (10.0f)
362
#define AL_REVERB_DEFAULT_ROOM_ROLLOFF_FACTOR    (0.0f)
363
364
#define AL_REVERB_MIN_DECAY_HFLIMIT              AL_FALSE
365
#define AL_REVERB_MAX_DECAY_HFLIMIT              AL_TRUE
366
#define AL_REVERB_DEFAULT_DECAY_HFLIMIT          AL_TRUE
367
368
/* EAX reverb effect */
369
#define AL_EAXREVERB_MIN_DENSITY                 (0.0f)
370
#define AL_EAXREVERB_MAX_DENSITY                 (1.0f)
371
#define AL_EAXREVERB_DEFAULT_DENSITY             (1.0f)
372
373
#define AL_EAXREVERB_MIN_DIFFUSION               (0.0f)
374
#define AL_EAXREVERB_MAX_DIFFUSION               (1.0f)
375
#define AL_EAXREVERB_DEFAULT_DIFFUSION           (1.0f)
376
377
#define AL_EAXREVERB_MIN_GAIN                    (0.0f)
378
#define AL_EAXREVERB_MAX_GAIN                    (1.0f)
379
#define AL_EAXREVERB_DEFAULT_GAIN                (0.32f)
380
381
#define AL_EAXREVERB_MIN_GAINHF                  (0.0f)
382
#define AL_EAXREVERB_MAX_GAINHF                  (1.0f)
383
#define AL_EAXREVERB_DEFAULT_GAINHF              (0.89f)
384
385
#define AL_EAXREVERB_MIN_GAINLF                  (0.0f)
386
#define AL_EAXREVERB_MAX_GAINLF                  (1.0f)
387
#define AL_EAXREVERB_DEFAULT_GAINLF              (1.0f)
388
389
#define AL_EAXREVERB_MIN_DECAY_TIME              (0.1f)
390
#define AL_EAXREVERB_MAX_DECAY_TIME              (20.0f)
391
#define AL_EAXREVERB_DEFAULT_DECAY_TIME          (1.49f)
392
393
#define AL_EAXREVERB_MIN_DECAY_HFRATIO           (0.1f)
394
#define AL_EAXREVERB_MAX_DECAY_HFRATIO           (2.0f)
395
#define AL_EAXREVERB_DEFAULT_DECAY_HFRATIO       (0.83f)
396
397
#define AL_EAXREVERB_MIN_DECAY_LFRATIO           (0.1f)
398
#define AL_EAXREVERB_MAX_DECAY_LFRATIO           (2.0f)
399
#define AL_EAXREVERB_DEFAULT_DECAY_LFRATIO       (1.0f)
400
401
#define AL_EAXREVERB_MIN_REFLECTIONS_GAIN        (0.0f)
402
#define AL_EAXREVERB_MAX_REFLECTIONS_GAIN        (3.16f)
403
#define AL_EAXREVERB_DEFAULT_REFLECTIONS_GAIN    (0.05f)
404
405
#define AL_EAXREVERB_MIN_REFLECTIONS_DELAY       (0.0f)
406
#define AL_EAXREVERB_MAX_REFLECTIONS_DELAY       (0.3f)
407
#define AL_EAXREVERB_DEFAULT_REFLECTIONS_DELAY   (0.007f)
301
408
302
/* Get a floating point parameter for a Filter object. */
409
#define AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ (0.0f)
303
typedef void (__cdecl *LPALGETFILTERF)( ALuint fid, ALenum pname, ALfloat* value );
304
void alGetFilterf( ALuint fid, ALenum pname, ALfloat* value );
305
typedef void (__cdecl *LPALGETFILTERFV)( ALuint fid, ALenum pname, ALfloat* values );
306
void alGetFilterfv( ALuint fid, ALenum pname, ALfloat* values );
307
308
309
/**
310
 * Auxiliary Slot object functions
311
 */
312
313
/* Create Auxiliary Slot objects. */
314
typedef void (__cdecl *LPALGENAUXILIARYEFFECTSLOTS)( ALsizei n, ALuint* slots ); 
315
void alGenAuxiliaryEffectSlots( ALsizei n, ALuint* slots ); 
316
317
/* Delete Auxiliary Slot objects. */
318
typedef void (__cdecl *LPALDELETEAUXILIARYEFFECTSLOTS)( ALsizei n, ALuint* slots );
319
void alDeleteAuxiliaryEffectSlots( ALsizei n, ALuint* slots );
320
321
/* Verify a handle is a valid Auxiliary Slot. */ 
322
typedef ALboolean (__cdecl *LPALISAUXILIARYEFFECTSLOT)( ALuint slot ); 
323
ALboolean alIsAuxiliaryEffectSlot( ALuint slot ); 
324
410
325
/* Set an integer parameter for a Auxiliary Slot object. */
411
#define AL_EAXREVERB_MIN_LATE_REVERB_GAIN        (0.0f)
326
typedef void (__cdecl *LPALAUXILIARYEFFECTSLOTI)( ALuint asid, ALenum param, ALint value ); 
412
#define AL_EAXREVERB_MAX_LATE_REVERB_GAIN        (10.0f)
327
void alAuxiliaryEffectSloti( ALuint asid, ALenum param, ALint value ); 
413
#define AL_EAXREVERB_DEFAULT_LATE_REVERB_GAIN    (1.26f)
328
typedef void (__cdecl *LPALAUXILIARYEFFECTSLOTIV)( ALuint asid, ALenum param, ALint* values ); 
329
void alAuxiliaryEffectSlotiv( ALuint asid, ALenum param, ALint* values ); 
330
414
331
/* Set a floating point parameter for an Auxiliary Slot object. */
415
#define AL_EAXREVERB_MIN_LATE_REVERB_DELAY       (0.0f)
332
typedef void (__cdecl *LPALAUXILIARYEFFECTSLOTF)( ALuint asid, ALenum param, ALfloat value ); 
416
#define AL_EAXREVERB_MAX_LATE_REVERB_DELAY       (0.1f)
333
void alAuxiliaryEffectSlotf( ALuint asid, ALenum param, ALfloat value ); 
417
#define AL_EAXREVERB_DEFAULT_LATE_REVERB_DELAY   (0.011f)
334
typedef void (__cdecl *LPALAUXILIARYEFFECTSLOTFV)( ALuint asid, ALenum param, ALfloat* values ); 
335
void alAuxiliaryEffectSlotfv( ALuint asid, ALenum param, ALfloat* values ); 
336
337
/* Get an integer parameter for a Auxiliary Slot object. */
338
typedef void (__cdecl *LPALGETAUXILIARYEFFECTSLOTI)( ALuint asid, ALenum pname, ALint* value );
339
void alGetAuxiliaryEffectSloti( ALuint asid, ALenum pname, ALint* value );
340
typedef void (__cdecl *LPALGETAUXILIARYEFFECTSLOTIV)( ALuint asid, ALenum pname, ALint* values );
341
void alGetAuxiliaryEffectSlotiv( ALuint asid, ALenum pname, ALint* values );
342
418
343
/* Get a floating point parameter for a Auxiliary Slot object. */
419
#define AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ (0.0f)
344
typedef void (__cdecl *LPALGETAUXILIARYEFFECTSLOTF)( ALuint asid, ALenum pname, ALfloat* value );
345
void alGetAuxiliaryEffectSlotf( ALuint asid, ALenum pname, ALfloat* value );
346
typedef void (__cdecl *LPALGETAUXILIARYEFFECTSLOTFV)( ALuint asid, ALenum pname, ALfloat* values );
347
void alGetAuxiliaryEffectSlotfv( ALuint asid, ALenum pname, ALfloat* values );
348
420
421
#define AL_EAXREVERB_MIN_ECHO_TIME               (0.075f)
422
#define AL_EAXREVERB_MAX_ECHO_TIME               (0.25f)
423
#define AL_EAXREVERB_DEFAULT_ECHO_TIME           (0.25f)
349
424
425
#define AL_EAXREVERB_MIN_ECHO_DEPTH              (0.0f)
426
#define AL_EAXREVERB_MAX_ECHO_DEPTH              (1.0f)
427
#define AL_EAXREVERB_DEFAULT_ECHO_DEPTH          (0.0f)
350
428
429
#define AL_EAXREVERB_MIN_MODULATION_TIME         (0.04f)
430
#define AL_EAXREVERB_MAX_MODULATION_TIME         (4.0f)
431
#define AL_EAXREVERB_DEFAULT_MODULATION_TIME     (0.25f)
351
432
352
/**********************************************************
433
#define AL_EAXREVERB_MIN_MODULATION_DEPTH        (0.0f)
353
 * Filter ranges and defaults.
434
#define AL_EAXREVERB_MAX_MODULATION_DEPTH        (1.0f)
354
 */
435
#define AL_EAXREVERB_DEFAULT_MODULATION_DEPTH    (0.0f)
355
436
356
/**
437
#define AL_EAXREVERB_MIN_AIR_ABSORPTION_GAINHF   (0.892f)
357
 * Lowpass filter
438
#define AL_EAXREVERB_MAX_AIR_ABSORPTION_GAINHF   (1.0f)
358
 */
439
#define AL_EAXREVERB_DEFAULT_AIR_ABSORPTION_GAINHF (0.994f)
359
440
360
#define LOWPASS_MIN_GAIN                                   0.0f
441
#define AL_EAXREVERB_MIN_HFREFERENCE             (1000.0f)
361
#define LOWPASS_MAX_GAIN                                   1.0f
442
#define AL_EAXREVERB_MAX_HFREFERENCE             (20000.0f)
362
#define LOWPASS_DEFAULT_GAIN                               1.0f
443
#define AL_EAXREVERB_DEFAULT_HFREFERENCE         (5000.0f)
363
444
364
#define LOWPASS_MIN_GAINHF                                 0.0f
445
#define AL_EAXREVERB_MIN_LFREFERENCE             (20.0f)
365
#define LOWPASS_MAX_GAINHF                                 1.0f
446
#define AL_EAXREVERB_MAX_LFREFERENCE             (1000.0f)
366
#define LOWPASS_DEFAULT_GAINHF                             1.0f
447
#define AL_EAXREVERB_DEFAULT_LFREFERENCE         (250.0f)
367
448
368
/**
449
#define AL_EAXREVERB_MIN_ROOM_ROLLOFF_FACTOR     (0.0f)
369
 * Highpass filter
450
#define AL_EAXREVERB_MAX_ROOM_ROLLOFF_FACTOR     (10.0f)
370
 */
451
#define AL_EAXREVERB_DEFAULT_ROOM_ROLLOFF_FACTOR (0.0f)
371
452
372
#define HIGHPASS_MIN_GAIN                                  0.0f
453
#define AL_EAXREVERB_MIN_DECAY_HFLIMIT           AL_FALSE
373
#define HIGHPASS_MAX_GAIN                                  1.0f
454
#define AL_EAXREVERB_MAX_DECAY_HFLIMIT           AL_TRUE
374
#define HIGHPASS_DEFAULT_GAIN                              1.0f
455
#define AL_EAXREVERB_DEFAULT_DECAY_HFLIMIT       AL_TRUE
375
456
376
#define HIGHPASS_MIN_GAINLF                                0.0f
457
/* Chorus effect */
377
#define HIGHPASS_MAX_GAINLF                                1.0f
458
#define AL_CHORUS_WAVEFORM_SINUSOID              (0)
378
#define HIGHPASS_DEFAULT_GAINLF                            1.0f
459
#define AL_CHORUS_WAVEFORM_TRIANGLE              (1)
379
460
380
/**
461
#define AL_CHORUS_MIN_WAVEFORM                   (0)
381
 * Bandpass filter
462
#define AL_CHORUS_MAX_WAVEFORM                   (1)
382
 */
463
#define AL_CHORUS_DEFAULT_WAVEFORM               (1)
383
464
384
#define BANDPASS_MIN_GAIN                                  0.0f
465
#define AL_CHORUS_MIN_PHASE                      (-180)
385
#define BANDPASS_MAX_GAIN                                  1.0f
466
#define AL_CHORUS_MAX_PHASE                      (180)
386
#define BANDPASS_DEFAULT_GAIN                              1.0f
467
#define AL_CHORUS_DEFAULT_PHASE                  (90)
387
468
388
#define BANDPASS_MIN_GAINHF                                0.0f
469
#define AL_CHORUS_MIN_RATE                       (0.0f)
389
#define BANDPASS_MAX_GAINHF                                1.0f
470
#define AL_CHORUS_MAX_RATE                       (10.0f)
390
#define BANDPASS_DEFAULT_GAINHF                            1.0f
471
#define AL_CHORUS_DEFAULT_RATE                   (1.1f)
391
472
392
#define BANDPASS_MIN_GAINLF                                0.0f
473
#define AL_CHORUS_MIN_DEPTH                      (0.0f)
393
#define BANDPASS_MAX_GAINLF                                1.0f
474
#define AL_CHORUS_MAX_DEPTH                      (1.0f)
394
#define BANDPASS_DEFAULT_GAINLF                            1.0f
475
#define AL_CHORUS_DEFAULT_DEPTH                  (0.1f)
395
476
477
#define AL_CHORUS_MIN_FEEDBACK                   (-1.0f)
478
#define AL_CHORUS_MAX_FEEDBACK                   (1.0f)
479
#define AL_CHORUS_DEFAULT_FEEDBACK               (0.25f)
396
480
481
#define AL_CHORUS_MIN_DELAY                      (0.0f)
482
#define AL_CHORUS_MAX_DELAY                      (0.016f)
483
#define AL_CHORUS_DEFAULT_DELAY                  (0.016f)
397
484
485
/* Distortion effect */
486
#define AL_DISTORTION_MIN_EDGE                   (0.0f)
487
#define AL_DISTORTION_MAX_EDGE                   (1.0f)
488
#define AL_DISTORTION_DEFAULT_EDGE               (0.2f)
398
489
399
 /**********************************************************
490
#define AL_DISTORTION_MIN_GAIN                   (0.01f)
400
 * Effect parameter structures, value definitions, ranges and defaults.
491
#define AL_DISTORTION_MAX_GAIN                   (1.0f)
401
 */
492
#define AL_DISTORTION_DEFAULT_GAIN               (0.05f)
493
494
#define AL_DISTORTION_MIN_LOWPASS_CUTOFF         (80.0f)
495
#define AL_DISTORTION_MAX_LOWPASS_CUTOFF         (24000.0f)
496
#define AL_DISTORTION_DEFAULT_LOWPASS_CUTOFF     (8000.0f)
497
498
#define AL_DISTORTION_MIN_EQCENTER               (80.0f)
499
#define AL_DISTORTION_MAX_EQCENTER               (24000.0f)
500
#define AL_DISTORTION_DEFAULT_EQCENTER           (3600.0f)
501
502
#define AL_DISTORTION_MIN_EQBANDWIDTH            (80.0f)
503
#define AL_DISTORTION_MAX_EQBANDWIDTH            (24000.0f)
504
#define AL_DISTORTION_DEFAULT_EQBANDWIDTH        (3600.0f)
505
506
/* Echo effect */
507
#define AL_ECHO_MIN_DELAY                        (0.0f)
508
#define AL_ECHO_MAX_DELAY                        (0.207f)
509
#define AL_ECHO_DEFAULT_DELAY                    (0.1f)
510
511
#define AL_ECHO_MIN_LRDELAY                      (0.0f)
512
#define AL_ECHO_MAX_LRDELAY                      (0.404f)
513
#define AL_ECHO_DEFAULT_LRDELAY                  (0.1f)
514
515
#define AL_ECHO_MIN_DAMPING                      (0.0f)
516
#define AL_ECHO_MAX_DAMPING                      (0.99f)
517
#define AL_ECHO_DEFAULT_DAMPING                  (0.5f)
518
519
#define AL_ECHO_MIN_FEEDBACK                     (0.0f)
520
#define AL_ECHO_MAX_FEEDBACK                     (1.0f)
521
#define AL_ECHO_DEFAULT_FEEDBACK                 (0.5f)
522
523
#define AL_ECHO_MIN_SPREAD                       (-1.0f)
524
#define AL_ECHO_MAX_SPREAD                       (1.0f)
525
#define AL_ECHO_DEFAULT_SPREAD                   (-1.0f)
526
527
/* Flanger effect */
528
#define AL_FLANGER_WAVEFORM_SINUSOID             (0)
529
#define AL_FLANGER_WAVEFORM_TRIANGLE             (1)
530
531
#define AL_FLANGER_MIN_WAVEFORM                  (0)
532
#define AL_FLANGER_MAX_WAVEFORM                  (1)
533
#define AL_FLANGER_DEFAULT_WAVEFORM              (1)
534
535
#define AL_FLANGER_MIN_PHASE                     (-180)
536
#define AL_FLANGER_MAX_PHASE                     (180)
537
#define AL_FLANGER_DEFAULT_PHASE                 (0)
538
539
#define AL_FLANGER_MIN_RATE                      (0.0f)
540
#define AL_FLANGER_MAX_RATE                      (10.0f)
541
#define AL_FLANGER_DEFAULT_RATE                  (0.27f)
542
543
#define AL_FLANGER_MIN_DEPTH                     (0.0f)
544
#define AL_FLANGER_MAX_DEPTH                     (1.0f)
545
#define AL_FLANGER_DEFAULT_DEPTH                 (1.0f)
546
547
#define AL_FLANGER_MIN_FEEDBACK                  (-1.0f)
548
#define AL_FLANGER_MAX_FEEDBACK                  (1.0f)
549
#define AL_FLANGER_DEFAULT_FEEDBACK              (-0.5f)
550
551
#define AL_FLANGER_MIN_DELAY                     (0.0f)
552
#define AL_FLANGER_MAX_DELAY                     (0.004f)
553
#define AL_FLANGER_DEFAULT_DELAY                 (0.002f)
554
555
/* Frequency shifter effect */
556
#define AL_FREQUENCY_SHIFTER_MIN_FREQUENCY       (0.0f)
557
#define AL_FREQUENCY_SHIFTER_MAX_FREQUENCY       (24000.0f)
558
#define AL_FREQUENCY_SHIFTER_DEFAULT_FREQUENCY   (0.0f)
559
560
#define AL_FREQUENCY_SHIFTER_MIN_LEFT_DIRECTION  (0)
561
#define AL_FREQUENCY_SHIFTER_MAX_LEFT_DIRECTION  (2)
562
#define AL_FREQUENCY_SHIFTER_DEFAULT_LEFT_DIRECTION (0)
563
564
#define AL_FREQUENCY_SHIFTER_DIRECTION_DOWN      (0)
565
#define AL_FREQUENCY_SHIFTER_DIRECTION_UP        (1)
566
#define AL_FREQUENCY_SHIFTER_DIRECTION_OFF       (2)
567
568
#define AL_FREQUENCY_SHIFTER_MIN_RIGHT_DIRECTION (0)
569
#define AL_FREQUENCY_SHIFTER_MAX_RIGHT_DIRECTION (2)
570
#define AL_FREQUENCY_SHIFTER_DEFAULT_RIGHT_DIRECTION (0)
571
572
/* Vocal morpher effect */
573
#define AL_VOCAL_MORPHER_MIN_PHONEMEA            (0)
574
#define AL_VOCAL_MORPHER_MAX_PHONEMEA            (29)
575
#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEA        (0)
576
577
#define AL_VOCAL_MORPHER_MIN_PHONEMEA_COARSE_TUNING (-24)
578
#define AL_VOCAL_MORPHER_MAX_PHONEMEA_COARSE_TUNING (24)
579
#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEA_COARSE_TUNING (0)
580
581
#define AL_VOCAL_MORPHER_MIN_PHONEMEB            (0)
582
#define AL_VOCAL_MORPHER_MAX_PHONEMEB            (29)
583
#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEB        (10)
584
585
#define AL_VOCAL_MORPHER_MIN_PHONEMEB_COARSE_TUNING (-24)
586
#define AL_VOCAL_MORPHER_MAX_PHONEMEB_COARSE_TUNING (24)
587
#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEB_COARSE_TUNING (0)
588
589
#define AL_VOCAL_MORPHER_PHONEME_A               (0)
590
#define AL_VOCAL_MORPHER_PHONEME_E               (1)
591
#define AL_VOCAL_MORPHER_PHONEME_I               (2)
592
#define AL_VOCAL_MORPHER_PHONEME_O               (3)
593
#define AL_VOCAL_MORPHER_PHONEME_U               (4)
594
#define AL_VOCAL_MORPHER_PHONEME_AA              (5)
595
#define AL_VOCAL_MORPHER_PHONEME_AE              (6)
596
#define AL_VOCAL_MORPHER_PHONEME_AH              (7)
597
#define AL_VOCAL_MORPHER_PHONEME_AO              (8)
598
#define AL_VOCAL_MORPHER_PHONEME_EH              (9)
599
#define AL_VOCAL_MORPHER_PHONEME_ER              (10)
600
#define AL_VOCAL_MORPHER_PHONEME_IH              (11)
601
#define AL_VOCAL_MORPHER_PHONEME_IY              (12)
602
#define AL_VOCAL_MORPHER_PHONEME_UH              (13)
603
#define AL_VOCAL_MORPHER_PHONEME_UW              (14)
604
#define AL_VOCAL_MORPHER_PHONEME_B               (15)
605
#define AL_VOCAL_MORPHER_PHONEME_D               (16)
606
#define AL_VOCAL_MORPHER_PHONEME_F               (17)
607
#define AL_VOCAL_MORPHER_PHONEME_G               (18)
608
#define AL_VOCAL_MORPHER_PHONEME_J               (19)
609
#define AL_VOCAL_MORPHER_PHONEME_K               (20)
610
#define AL_VOCAL_MORPHER_PHONEME_L               (21)
611
#define AL_VOCAL_MORPHER_PHONEME_M               (22)
612
#define AL_VOCAL_MORPHER_PHONEME_N               (23)
613
#define AL_VOCAL_MORPHER_PHONEME_P               (24)
614
#define AL_VOCAL_MORPHER_PHONEME_R               (25)
615
#define AL_VOCAL_MORPHER_PHONEME_S               (26)
616
#define AL_VOCAL_MORPHER_PHONEME_T               (27)
617
#define AL_VOCAL_MORPHER_PHONEME_V               (28)
618
#define AL_VOCAL_MORPHER_PHONEME_Z               (29)
619
620
#define AL_VOCAL_MORPHER_WAVEFORM_SINUSOID       (0)
621
#define AL_VOCAL_MORPHER_WAVEFORM_TRIANGLE       (1)
622
#define AL_VOCAL_MORPHER_WAVEFORM_SAWTOOTH       (2)
623
624
#define AL_VOCAL_MORPHER_MIN_WAVEFORM            (0)
625
#define AL_VOCAL_MORPHER_MAX_WAVEFORM            (2)
626
#define AL_VOCAL_MORPHER_DEFAULT_WAVEFORM        (0)
627
628
#define AL_VOCAL_MORPHER_MIN_RATE                (0.0f)
629
#define AL_VOCAL_MORPHER_MAX_RATE                (10.0f)
630
#define AL_VOCAL_MORPHER_DEFAULT_RATE            (1.41f)
631
632
/* Pitch shifter effect */
633
#define AL_PITCH_SHIFTER_MIN_COARSE_TUNE         (-12)
634
#define AL_PITCH_SHIFTER_MAX_COARSE_TUNE         (12)
635
#define AL_PITCH_SHIFTER_DEFAULT_COARSE_TUNE     (12)
636
637
#define AL_PITCH_SHIFTER_MIN_FINE_TUNE           (-50)
638
#define AL_PITCH_SHIFTER_MAX_FINE_TUNE           (50)
639
#define AL_PITCH_SHIFTER_DEFAULT_FINE_TUNE       (0)
640
641
/* Ring modulator effect */
642
#define AL_RING_MODULATOR_MIN_FREQUENCY          (0.0f)
643
#define AL_RING_MODULATOR_MAX_FREQUENCY          (8000.0f)
644
#define AL_RING_MODULATOR_DEFAULT_FREQUENCY      (440.0f)
645
646
#define AL_RING_MODULATOR_MIN_HIGHPASS_CUTOFF    (0.0f)
647
#define AL_RING_MODULATOR_MAX_HIGHPASS_CUTOFF    (24000.0f)
648
#define AL_RING_MODULATOR_DEFAULT_HIGHPASS_CUTOFF (800.0f)
649
650
#define AL_RING_MODULATOR_SINUSOID               (0)
651
#define AL_RING_MODULATOR_SAWTOOTH               (1)
652
#define AL_RING_MODULATOR_SQUARE                 (2)
653
654
#define AL_RING_MODULATOR_MIN_WAVEFORM           (0)
655
#define AL_RING_MODULATOR_MAX_WAVEFORM           (2)
656
#define AL_RING_MODULATOR_DEFAULT_WAVEFORM       (0)
657
658
/* Autowah effect */
659
#define AL_AUTOWAH_MIN_ATTACK_TIME               (0.0001f)
660
#define AL_AUTOWAH_MAX_ATTACK_TIME               (1.0f)
661
#define AL_AUTOWAH_DEFAULT_ATTACK_TIME           (0.06f)
662
663
#define AL_AUTOWAH_MIN_RELEASE_TIME              (0.0001f)
664
#define AL_AUTOWAH_MAX_RELEASE_TIME              (1.0f)
665
#define AL_AUTOWAH_DEFAULT_RELEASE_TIME          (0.06f)
666
667
#define AL_AUTOWAH_MIN_RESONANCE                 (2.0f)
668
#define AL_AUTOWAH_MAX_RESONANCE                 (1000.0f)
669
#define AL_AUTOWAH_DEFAULT_RESONANCE             (1000.0f)
670
671
#define AL_AUTOWAH_MIN_PEAK_GAIN                 (0.00003f)
672
#define AL_AUTOWAH_MAX_PEAK_GAIN                 (31621.0f)
673
#define AL_AUTOWAH_DEFAULT_PEAK_GAIN             (11.22f)
674
675
/* Compressor effect */
676
#define AL_COMPRESSOR_MIN_ONOFF                  (0)
677
#define AL_COMPRESSOR_MAX_ONOFF                  (1)
678
#define AL_COMPRESSOR_DEFAULT_ONOFF              (1)
679
680
/* Equalizer effect */
681
#define AL_EQUALIZER_MIN_LOW_GAIN                (0.126f)
682
#define AL_EQUALIZER_MAX_LOW_GAIN                (7.943f)
683
#define AL_EQUALIZER_DEFAULT_LOW_GAIN            (1.0f)
684
685
#define AL_EQUALIZER_MIN_LOW_CUTOFF              (50.0f)
686
#define AL_EQUALIZER_MAX_LOW_CUTOFF              (800.0f)
687
#define AL_EQUALIZER_DEFAULT_LOW_CUTOFF          (200.0f)
688
689
#define AL_EQUALIZER_MIN_MID1_GAIN               (0.126f)
690
#define AL_EQUALIZER_MAX_MID1_GAIN               (7.943f)
691
#define AL_EQUALIZER_DEFAULT_MID1_GAIN           (1.0f)
692
693
#define AL_EQUALIZER_MIN_MID1_CENTER             (200.0f)
694
#define AL_EQUALIZER_MAX_MID1_CENTER             (3000.0f)
695
#define AL_EQUALIZER_DEFAULT_MID1_CENTER         (500.0f)
696
697
#define AL_EQUALIZER_MIN_MID1_WIDTH              (0.01f)
698
#define AL_EQUALIZER_MAX_MID1_WIDTH              (1.0f)
699
#define AL_EQUALIZER_DEFAULT_MID1_WIDTH          (1.0f)
700
701
#define AL_EQUALIZER_MIN_MID2_GAIN               (0.126f)
702
#define AL_EQUALIZER_MAX_MID2_GAIN               (7.943f)
703
#define AL_EQUALIZER_DEFAULT_MID2_GAIN           (1.0f)
704
705
#define AL_EQUALIZER_MIN_MID2_CENTER             (1000.0f)
706
#define AL_EQUALIZER_MAX_MID2_CENTER             (8000.0f)
707
#define AL_EQUALIZER_DEFAULT_MID2_CENTER         (3000.0f)
708
709
#define AL_EQUALIZER_MIN_MID2_WIDTH              (0.01f)
710
#define AL_EQUALIZER_MAX_MID2_WIDTH              (1.0f)
711
#define AL_EQUALIZER_DEFAULT_MID2_WIDTH          (1.0f)
402
712
403
/**
713
#define AL_EQUALIZER_MIN_HIGH_GAIN               (0.126f)
404
 * AL reverb effect parameter ranges and defaults
714
#define AL_EQUALIZER_MAX_HIGH_GAIN               (7.943f)
405
 */
715
#define AL_EQUALIZER_DEFAULT_HIGH_GAIN           (1.0f)
406
#define AL_REVERB_MIN_DENSITY                              0.0f
407
#define AL_REVERB_MAX_DENSITY                              1.0f
408
#define AL_REVERB_DEFAULT_DENSITY                          1.0f
409
716
410
#define AL_REVERB_MIN_DIFFUSION                            0.0f
717
#define AL_EQUALIZER_MIN_HIGH_CUTOFF             (4000.0f)
411
#define AL_REVERB_MAX_DIFFUSION                            1.0f
718
#define AL_EQUALIZER_MAX_HIGH_CUTOFF             (16000.0f)
412
#define AL_REVERB_DEFAULT_DIFFUSION                        1.0f
719
#define AL_EQUALIZER_DEFAULT_HIGH_CUTOFF         (6000.0f)
413
720
414
#define AL_REVERB_MIN_GAIN                                 0.0f
415
#define AL_REVERB_MAX_GAIN                                 1.0f
416
#define AL_REVERB_DEFAULT_GAIN                             0.32f
417
721
418
#define AL_REVERB_MIN_GAINHF                               0.0f
722
/* Source parameter value ranges and defaults. */
419
#define AL_REVERB_MAX_GAINHF                               1.0f
723
#define AL_MIN_AIR_ABSORPTION_FACTOR             (0.0f)
420
#define AL_REVERB_DEFAULT_GAINHF                           0.89f
724
#define AL_MAX_AIR_ABSORPTION_FACTOR             (10.0f)
725
#define AL_DEFAULT_AIR_ABSORPTION_FACTOR         (0.0f)
421
726
422
#define AL_REVERB_MIN_DECAY_TIME                           0.1f
727
#define AL_MIN_ROOM_ROLLOFF_FACTOR               (0.0f)
423
#define AL_REVERB_MAX_DECAY_TIME                           20.0f
728
#define AL_MAX_ROOM_ROLLOFF_FACTOR               (10.0f)
424
#define AL_REVERB_DEFAULT_DECAY_TIME                       1.49f
729
#define AL_DEFAULT_ROOM_ROLLOFF_FACTOR           (0.0f)
425
730
426
#define AL_REVERB_MIN_DECAY_HFRATIO                        0.1f
731
#define AL_MIN_CONE_OUTER_GAINHF                 (0.0f)
427
#define AL_REVERB_MAX_DECAY_HFRATIO                        2.0f
732
#define AL_MAX_CONE_OUTER_GAINHF                 (1.0f)
428
#define AL_REVERB_DEFAULT_DECAY_HFRATIO                    0.83f
733
#define AL_DEFAULT_CONE_OUTER_GAINHF             (1.0f)
429
734
430
#define AL_REVERB_MIN_REFLECTIONS_GAIN                     0.0f
735
#define AL_MIN_DIRECT_FILTER_GAINHF_AUTO         AL_FALSE
431
#define AL_REVERB_MAX_REFLECTIONS_GAIN                     3.16f
736
#define AL_MAX_DIRECT_FILTER_GAINHF_AUTO         AL_TRUE
432
#define AL_REVERB_DEFAULT_REFLECTIONS_GAIN                 0.05f
737
#define AL_DEFAULT_DIRECT_FILTER_GAINHF_AUTO     AL_TRUE
433
738
434
#define AL_REVERB_MIN_REFLECTIONS_DELAY                    0.0f
739
#define AL_MIN_AUXILIARY_SEND_FILTER_GAIN_AUTO   AL_FALSE
435
#define AL_REVERB_MAX_REFLECTIONS_DELAY                    0.3f
740
#define AL_MAX_AUXILIARY_SEND_FILTER_GAIN_AUTO   AL_TRUE
436
#define AL_REVERB_DEFAULT_REFLECTIONS_DELAY                0.007f
741
#define AL_DEFAULT_AUXILIARY_SEND_FILTER_GAIN_AUTO AL_TRUE
437
742
438
#define AL_REVERB_MIN_LATE_REVERB_GAIN                     0.0f
743
#define AL_MIN_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_FALSE
439
#define AL_REVERB_MAX_LATE_REVERB_GAIN                     10.0f
744
#define AL_MAX_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_TRUE
440
#define AL_REVERB_DEFAULT_LATE_REVERB_GAIN                 1.26f
745
#define AL_DEFAULT_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_TRUE
441
746
442
#define AL_REVERB_MIN_LATE_REVERB_DELAY                    0.0f
443
#define AL_REVERB_MAX_LATE_REVERB_DELAY                    0.1f
444
#define AL_REVERB_DEFAULT_LATE_REVERB_DELAY                0.011f
445
747
446
#define AL_REVERB_MIN_AIR_ABSORPTION_GAINHF                0.892f
748
/* Listener parameter value ranges and defaults. */
447
#define AL_REVERB_MAX_AIR_ABSORPTION_GAINHF                1.0f
749
#define AL_MIN_METERS_PER_UNIT                   FLT_MIN
448
#define AL_REVERB_DEFAULT_AIR_ABSORPTION_GAINHF            0.994f
750
#define AL_MAX_METERS_PER_UNIT                   FLT_MAX
751
#define AL_DEFAULT_METERS_PER_UNIT               (1.0f)
449
752
450
#define AL_REVERB_MIN_ROOM_ROLLOFF_FACTOR                  0.0f
451
#define AL_REVERB_MAX_ROOM_ROLLOFF_FACTOR                  10.0f
452
#define AL_REVERB_DEFAULT_ROOM_ROLLOFF_FACTOR              0.0f
453
454
#define AL_REVERB_MIN_DECAY_HFLIMIT                        AL_FALSE
455
#define AL_REVERB_MAX_DECAY_HFLIMIT                        AL_TRUE
456
#define AL_REVERB_DEFAULT_DECAY_HFLIMIT                    AL_TRUE
457
458
/**
459
 * AL chorus effect parameter ranges and defaults
460
 */
461
#define AL_CHORUS_MIN_WAVEFORM                             0
462
#define AL_CHORUS_MAX_WAVEFORM                             1
463
#define AL_CHORUS_DEFAULT_WAVEFORM                         1
464
465
#define AL_CHORUS_WAVEFORM_SINUSOID                        0
466
#define AL_CHORUS_WAVEFORM_TRIANGLE                        1
467
468
#define AL_CHORUS_MIN_PHASE                                (-180)
469
#define AL_CHORUS_MAX_PHASE                                180
470
#define AL_CHORUS_DEFAULT_PHASE                            90
471
472
#define AL_CHORUS_MIN_RATE                                 0.0f
473
#define AL_CHORUS_MAX_RATE                                 10.0f
474
#define AL_CHORUS_DEFAULT_RATE                             1.1f
475
476
#define AL_CHORUS_MIN_DEPTH                                0.0f
477
#define AL_CHORUS_MAX_DEPTH                                1.0f
478
#define AL_CHORUS_DEFAULT_DEPTH                            0.1f
479
480
#define AL_CHORUS_MIN_FEEDBACK                             (-1.0f)
481
#define AL_CHORUS_MAX_FEEDBACK                             1.0f
482
#define AL_CHORUS_DEFAULT_FEEDBACK                         0.25f
483
484
#define AL_CHORUS_MIN_DELAY                                0.0f
485
#define AL_CHORUS_MAX_DELAY                                0.016f
486
#define AL_CHORUS_DEFAULT_DELAY                            0.016f
487
488
/**
489
 * AL distortion effect parameter ranges and defaults
490
 */
491
#define AL_DISTORTION_MIN_EDGE                             0.0f
492
#define AL_DISTORTION_MAX_EDGE                             1.0f
493
#define AL_DISTORTION_DEFAULT_EDGE                         0.2f
494
495
#define AL_DISTORTION_MIN_GAIN                             0.01f
496
#define AL_DISTORTION_MAX_GAIN                             1.0f
497
#define AL_DISTORTION_DEFAULT_GAIN                         0.05f
498
499
#define AL_DISTORTION_MIN_LOWPASS_CUTOFF                   80.0f
500
#define AL_DISTORTION_MAX_LOWPASS_CUTOFF                   24000.0f
501
#define AL_DISTORTION_DEFAULT_LOWPASS_CUTOFF               8000.0f
502
503
#define AL_DISTORTION_MIN_EQCENTER                         80.0f
504
#define AL_DISTORTION_MAX_EQCENTER                         24000.0f
505
#define AL_DISTORTION_DEFAULT_EQCENTER                     3600.0f
506
507
#define AL_DISTORTION_MIN_EQBANDWIDTH                      80.0f
508
#define AL_DISTORTION_MAX_EQBANDWIDTH                      24000.0f
509
#define AL_DISTORTION_DEFAULT_EQBANDWIDTH                  3600.0f
510
511
/**
512
 * AL echo effect parameter ranges and defaults
513
 */
514
#define AL_ECHO_MIN_DELAY                                  0.0f
515
#define AL_ECHO_MAX_DELAY                                  0.207f
516
#define AL_ECHO_DEFAULT_DELAY                              0.1f
517
518
#define AL_ECHO_MIN_LRDELAY                                0.0f
519
#define AL_ECHO_MAX_LRDELAY                                0.404f
520
#define AL_ECHO_DEFAULT_LRDELAY                            0.1f
521
522
#define AL_ECHO_MIN_DAMPING                                0.0f
523
#define AL_ECHO_MAX_DAMPING                                0.99f
524
#define AL_ECHO_DEFAULT_DAMPING                            0.5f
525
526
#define AL_ECHO_MIN_FEEDBACK                               0.0f
527
#define AL_ECHO_MAX_FEEDBACK                               1.0f
528
#define AL_ECHO_DEFAULT_FEEDBACK                           0.5f
529
530
#define AL_ECHO_MIN_SPREAD                                 (-1.0f)
531
#define AL_ECHO_MAX_SPREAD                                 1.0f
532
#define AL_ECHO_DEFAULT_SPREAD                             (-1.0f)
533
534
/**
535
 * AL flanger effect parameter ranges and defaults
536
 */
537
#define AL_FLANGER_MIN_WAVEFORM                            0
538
#define AL_FLANGER_MAX_WAVEFORM                            1
539
#define AL_FLANGER_DEFAULT_WAVEFORM                        1
540
541
#define AL_FLANGER_WAVEFORM_SINUSOID                       0
542
#define AL_FLANGER_WAVEFORM_TRIANGLE                       1
543
544
#define AL_FLANGER_MIN_PHASE                               (-180)
545
#define AL_FLANGER_MAX_PHASE                               180
546
#define AL_FLANGER_DEFAULT_PHASE                           90
547
548
#define AL_FLANGER_MIN_RATE                                0.0f
549
#define AL_FLANGER_MAX_RATE                                10.0f
550
#define AL_FLANGER_DEFAULT_RATE                            0.27f
551
552
#define AL_FLANGER_MIN_DEPTH                               0.0f
553
#define AL_FLANGER_MAX_DEPTH                               1.0f
554
#define AL_FLANGER_DEFAULT_DEPTH                           1.0f
555
556
#define AL_FLANGER_MIN_FEEDBACK                            (-1.0f)
557
#define AL_FLANGER_MAX_FEEDBACK                            1.0f
558
#define AL_FLANGER_DEFAULT_FEEDBACK                        (-0.5f)
559
560
#define AL_FLANGER_MIN_DELAY                               0.0f
561
#define AL_FLANGER_MAX_DELAY                               0.004f
562
#define AL_FLANGER_DEFAULT_DELAY                           0.002f
563
564
/**
565
 * AL frequency shifter effect parameter ranges and defaults
566
 */
567
#define AL_FREQUENCY_SHIFTER_MIN_FREQUENCY                 0.0f
568
#define AL_FREQUENCY_SHIFTER_MAX_FREQUENCY                 24000.0f
569
#define AL_FREQUENCY_SHIFTER_DEFAULT_FREQUENCY             0.0f
570
571
#define AL_FREQUENCY_SHIFTER_MIN_LEFT_DIRECTION            0
572
#define AL_FREQUENCY_SHIFTER_MAX_LEFT_DIRECTION            2
573
#define AL_FREQUENCY_SHIFTER_DEFAULT_LEFT_DIRECTION        0
574
575
#define AL_FREQUENCY_SHIFTER_MIN_RIGHT_DIRECTION           0
576
#define AL_FREQUENCY_SHIFTER_MAX_RIGHT_DIRECTION           2
577
#define AL_FREQUENCY_SHIFTER_DEFAULT_RIGHT_DIRECTION       0
578
579
#define AL_FREQUENCY_SHIFTER_DIRECTION_DOWN                0
580
#define AL_FREQUENCY_SHIFTER_DIRECTION_UP                  1
581
#define AL_FREQUENCY_SHIFTER_DIRECTION_OFF                 2
582
583
/**
584
 * AL vocal morpher effect parameter ranges and defaults
585
 */
586
#define AL_VOCAL_MORPHER_MIN_PHONEMEA                      0
587
#define AL_VOCAL_MORPHER_MAX_PHONEMEA                      29
588
#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEA                  0
589
590
#define AL_VOCAL_MORPHER_MIN_PHONEMEA_COARSE_TUNING      (-24)
591
#define AL_VOCAL_MORPHER_MAX_PHONEMEA_COARSE_TUNING        24
592
#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEA_COARSE_TUNING    0
593
594
#define AL_VOCAL_MORPHER_MIN_PHONEMEB                      0
595
#define AL_VOCAL_MORPHER_MAX_PHONEMEB                      29
596
#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEB                  10
597
598
#define AL_VOCAL_MORPHER_PHONEME_A                         0
599
#define AL_VOCAL_MORPHER_PHONEME_E                         1
600
#define AL_VOCAL_MORPHER_PHONEME_I                         2
601
#define AL_VOCAL_MORPHER_PHONEME_O                         3
602
#define AL_VOCAL_MORPHER_PHONEME_U                         4
603
#define AL_VOCAL_MORPHER_PHONEME_AA                        5
604
#define AL_VOCAL_MORPHER_PHONEME_AE                        6
605
#define AL_VOCAL_MORPHER_PHONEME_AH                        7
606
#define AL_VOCAL_MORPHER_PHONEME_AO                        8
607
#define AL_VOCAL_MORPHER_PHONEME_EH                        9
608
#define AL_VOCAL_MORPHER_PHONEME_ER                        10
609
#define AL_VOCAL_MORPHER_PHONEME_IH                        11
610
#define AL_VOCAL_MORPHER_PHONEME_IY                        12
611
#define AL_VOCAL_MORPHER_PHONEME_UH                        13
612
#define AL_VOCAL_MORPHER_PHONEME_UW                        14
613
#define AL_VOCAL_MORPHER_PHONEME_B                         15
614
#define AL_VOCAL_MORPHER_PHONEME_D                         16
615
#define AL_VOCAL_MORPHER_PHONEME_F                         17
616
#define AL_VOCAL_MORPHER_PHONEME_G                         18
617
#define AL_VOCAL_MORPHER_PHONEME_J                         19
618
#define AL_VOCAL_MORPHER_PHONEME_K                         20
619
#define AL_VOCAL_MORPHER_PHONEME_L                         21
620
#define AL_VOCAL_MORPHER_PHONEME_M                         22
621
#define AL_VOCAL_MORPHER_PHONEME_N                         23
622
#define AL_VOCAL_MORPHER_PHONEME_P                         24
623
#define AL_VOCAL_MORPHER_PHONEME_R                         25
624
#define AL_VOCAL_MORPHER_PHONEME_S                         26
625
#define AL_VOCAL_MORPHER_PHONEME_T                         27
626
#define AL_VOCAL_MORPHER_PHONEME_V                         28
627
#define AL_VOCAL_MORPHER_PHONEME_Z                         29
628
629
#define AL_VOCAL_MORPHER_MIN_PHONEMEB_COARSE_TUNING        (-24)
630
#define AL_VOCAL_MORPHER_MAX_PHONEMEB_COARSE_TUNING        24
631
#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEB_COARSE_TUNING    0
632
633
#define AL_VOCAL_MORPHER_MIN_WAVEFORM                      0
634
#define AL_VOCAL_MORPHER_MAX_WAVEFORM                      2
635
#define AL_VOCAL_MORPHER_DEFAULT_WAVEFORM                  0
636
637
#define AL_VOCAL_MORPHER_WAVEFORM_SINUSOID                 0
638
#define AL_VOCAL_MORPHER_WAVEFORM_TRIANGLE                 1
639
#define AL_VOCAL_MORPHER_WAVEFORM_SAWTOOTH                 2
640
641
#define AL_VOCAL_MORPHER_MIN_RATE                          0.0f
642
#define AL_VOCAL_MORPHER_MAX_RATE                          10.0f
643
#define AL_VOCAL_MORPHER_DEFAULT_RATE                      1.41f
644
645
/**
646
 * AL pitch shifter effect parameter ranges and defaults
647
 */
648
#define AL_PITCH_SHIFTER_MIN_COARSE_TUNE                   (-12)
649
#define AL_PITCH_SHIFTER_MAX_COARSE_TUNE                   12
650
#define AL_PITCH_SHIFTER_DEFAULT_COARSE_TUNE               12
651
652
#define AL_PITCH_SHIFTER_MIN_FINE_TUNE                     (-50)
653
#define AL_PITCH_SHIFTER_MAX_FINE_TUNE                     50
654
#define AL_PITCH_SHIFTER_DEFAULT_FINE_TUNE                 0
655
656
/**
657
 * AL ring modulator effect parameter ranges and defaults
658
 */
659
#define AL_RING_MODULATOR_MIN_FREQUENCY                    0.0f
660
#define AL_RING_MODULATOR_MAX_FREQUENCY                    8000.0f
661
#define AL_RING_MODULATOR_DEFAULT_FREQUENCY                440.0f
662
663
#define AL_RING_MODULATOR_MIN_HIGHPASS_CUTOFF              0.0f
664
#define AL_RING_MODULATOR_MAX_HIGHPASS_CUTOFF              24000.0f
665
#define AL_RING_MODULATOR_DEFAULT_HIGHPASS_CUTOFF          800.0f
666
667
#define AL_RING_MODULATOR_MIN_WAVEFORM                     0
668
#define AL_RING_MODULATOR_MAX_WAVEFORM                     2
669
#define AL_RING_MODULATOR_DEFAULT_WAVEFORM                 0
670
671
#define AL_RING_MODULATOR_SINUSOID                         0
672
#define AL_RING_MODULATOR_SAWTOOTH                         1
673
#define AL_RING_MODULATOR_SQUARE                           2
674
675
/**
676
 * AL autowah effect parameter ranges and defaults
677
 */
678
#define AL_AUTOWAH_MIN_ATTACK_TIME                         0.0001f
679
#define AL_AUTOWAH_MAX_ATTACK_TIME                         1.0f
680
#define AL_AUTOWAH_DEFAULT_ATTACK_TIME                     0.06f
681
682
#define AL_AUTOWAH_MIN_RELEASE_TIME                        0.0001f
683
#define AL_AUTOWAH_MAX_RELEASE_TIME                        1.0f
684
#define AL_AUTOWAH_DEFAULT_RELEASE_TIME                    0.06f
685
686
#define AL_AUTOWAH_MIN_RESONANCE                           2.0f
687
#define AL_AUTOWAH_MAX_RESONANCE                           1000.0f
688
#define AL_AUTOWAH_DEFAULT_RESONANCE                       1000.0f
689
690
#define AL_AUTOWAH_MIN_PEAK_GAIN                           0.00003f
691
#define AL_AUTOWAH_MAX_PEAK_GAIN                           31621.0f
692
#define AL_AUTOWAH_DEFAULT_PEAK_GAIN                       11.22f
693
694
/**
695
 * AL compressor effect parameter ranges and defaults
696
 */
697
#define AL_COMPRESSOR_MIN_ONOFF                            0
698
#define AL_COMPRESSOR_MAX_ONOFF                            1
699
#define AL_COMPRESSOR_DEFAULT_ONOFF                        1
700
701
/**
702
 * AL equalizer effect parameter ranges and defaults
703
 */
704
#define AL_EQUALIZER_MIN_LOW_GAIN                          0.126f
705
#define AL_EQUALIZER_MAX_LOW_GAIN                          7.943f
706
#define AL_EQUALIZER_DEFAULT_LOW_GAIN                      1.0f
707
708
#define AL_EQUALIZER_MIN_LOW_CUTOFF                        50.0f
709
#define AL_EQUALIZER_MAX_LOW_CUTOFF                        800.0f
710
#define AL_EQUALIZER_DEFAULT_LOW_CUTOFF                    200.0f
711
712
#define AL_EQUALIZER_MIN_MID1_GAIN                         0.126f
713
#define AL_EQUALIZER_MAX_MID1_GAIN                         7.943f
714
#define AL_EQUALIZER_DEFAULT_MID1_GAIN                     1.0f
715
716
#define AL_EQUALIZER_MIN_MID1_CENTER                       200.0f
717
#define AL_EQUALIZER_MAX_MID1_CENTER                       3000.0f
718
#define AL_EQUALIZER_DEFAULT_MID1_CENTER                   500.0f
719
720
#define AL_EQUALIZER_MIN_MID1_WIDTH                        0.01f
721
#define AL_EQUALIZER_MAX_MID1_WIDTH                        1.0f
722
#define AL_EQUALIZER_DEFAULT_MID1_WIDTH                    1.0f
723
724
#define AL_EQUALIZER_MIN_MID2_GAIN                         0.126f
725
#define AL_EQUALIZER_MAX_MID2_GAIN                         7.943f
726
#define AL_EQUALIZER_DEFAULT_MID2_GAIN                     1.0f
727
728
#define AL_EQUALIZER_MIN_MID2_CENTER                       1000.0f
729
#define AL_EQUALIZER_MAX_MID2_CENTER                       8000.0f
730
#define AL_EQUALIZER_DEFAULT_MID2_CENTER                   3000.0f
731
732
#define AL_EQUALIZER_MIN_MID2_WIDTH                        0.01f
733
#define AL_EQUALIZER_MAX_MID2_WIDTH                        1.0f
734
#define AL_EQUALIZER_DEFAULT_MID2_WIDTH                    1.0f
735
736
#define AL_EQUALIZER_MIN_HIGH_GAIN                         0.126f
737
#define AL_EQUALIZER_MAX_HIGH_GAIN                         7.943f
738
#define AL_EQUALIZER_DEFAULT_HIGH_GAIN                     1.0f
739
740
#define AL_EQUALIZER_MIN_HIGH_CUTOFF                       4000.0f
741
#define AL_EQUALIZER_MAX_HIGH_CUTOFF                       16000.0f
742
#define AL_EQUALIZER_DEFAULT_HIGH_CUTOFF                   6000.0f
743
753
744
#ifdef __cplusplus
754
#ifdef __cplusplus
745
}  /* extern "C" */
755
}  /* extern "C" */
746
#endif
756
#endif
747
757
748
#endif /* __efx_h_ */
758
#endif /* AL_EFX_H */
(-)a/src/java/com/jogamp/openal/ALFactory.java (+16 lines)
Lines 36-41 package com.jogamp.openal; Link Here
36
import com.jogamp.common.os.Platform;
36
import com.jogamp.common.os.Platform;
37
import com.jogamp.openal.AL;
37
import com.jogamp.openal.AL;
38
import com.jogamp.openal.ALC;
38
import com.jogamp.openal.ALC;
39
import com.jogamp.openal.ALExt;
39
import jogamp.openal.*;
40
import jogamp.openal.*;
40
41
41
/**
42
/**
Lines 50-55 public class ALFactory { Link Here
50
  private static boolean initialized = false;
51
  private static boolean initialized = false;
51
  private static AL al;
52
  private static AL al;
52
  private static ALC alc;
53
  private static ALC alc;
54
  private static ALExt alext;
53
55
54
  private ALFactory() {}
56
  private ALFactory() {}
55
57
Lines 97-100 public class ALFactory { Link Here
97
    }
99
    }
98
    return alc;
100
    return alc;
99
  }
101
  }
102
103
  /**
104
   * Get the default ALExt object. This object is used to access most of the 
105
   * OpenAL extension functionality.
106
   *
107
   * @return the ALExt object
108
   */
109
  public static ALExt getALExt() throws ALException{
110
    initialize();
111
    if (alext == null) {
112
        alext = new ALExtImpl();
113
    }
114
    return alext;
115
  }
100
}
116
}
(-)a/src/java/jogamp/openal/ALExtImpl.java (+15 lines)
Line 0 Link Here
1
package jogamp.openal;
2
3
import com.jogamp.common.nio.Buffers;
4
import com.jogamp.openal.ALException;
5
import com.jogamp.openal.ALCdevice;
6
import java.io.UnsupportedEncodingException;
7
import java.nio.ByteBuffer;
8
import java.util.ArrayList;
9
10
/**
11
 * ALExt implementation.
12
 */
13
public class ALExtImpl extends ALExtAbstractImpl {
14
15
}
(-)a/src/java/jogamp/openal/Debug.java (-1 / +5 lines)
Lines 55-60 public class Debug extends PropertyAccess { Link Here
55
    debugAll = isPropertyDefined("joal.debug", true);
55
    debugAll = isPropertyDefined("joal.debug", true);
56
  }
56
  }
57
57
58
  public static final boolean isPropertyDefined(final String property, final boolean jnlpAlias) {
59
    return PropertyAccess.isPropertyDefined(property, jnlpAlias, null);
60
  }  
61
58
  public static boolean verbose() {
62
  public static boolean verbose() {
59
    return verbose;
63
    return verbose;
60
  }
64
  }
Lines 64-69 public class Debug extends PropertyAccess { Link Here
64
  }
68
  }
65
69
66
  public static boolean debug(String subcomponent) {
70
  public static boolean debug(String subcomponent) {
67
    return debugAll() || isPropertyDefined("joal.debug." + subcomponent, true);
71
	  return debugAll() || isPropertyDefined("joal.debug." + subcomponent, true, null);
68
  }
72
  }
69
}
73
}
(-)a/src/native/almisc.c (-1 / +1 lines)
Lines 31-37 JNIEXPORT jlong JNICALL Link Here
31
Java_jogamp_openal_ALImpl_dispatch_1alGetProcAddressStatic(JNIEnv *env, jclass _unused, jstring fname, jlong procAddress) {
31
Java_jogamp_openal_ALImpl_dispatch_1alGetProcAddressStatic(JNIEnv *env, jclass _unused, jstring fname, jlong procAddress) {
32
  LPALGETPROCADDRESS ptr_alGetProcAddress;
32
  LPALGETPROCADDRESS ptr_alGetProcAddress;
33
  const char* _strchars_fname = NULL;
33
  const char* _strchars_fname = NULL;
34
  ALproc _res;
34
  void *_res;
35
  if ( NULL != fname ) {
35
  if ( NULL != fname ) {
36
    _strchars_fname = (*env)->GetStringUTFChars(env, fname, (jboolean*)NULL);
36
    _strchars_fname = (*env)->GetStringUTFChars(env, fname, (jboolean*)NULL);
37
  if ( NULL == _strchars_fname ) {
37
  if ( NULL == _strchars_fname ) {
(-)a/src/test/com/jogamp/openal/test/junit/ALTest.java (+78 lines)
Lines 8-18 package com.jogamp.openal.test.junit; Link Here
8
8
9
import com.jogamp.openal.AL;
9
import com.jogamp.openal.AL;
10
import com.jogamp.openal.ALC;
10
import com.jogamp.openal.ALC;
11
import com.jogamp.openal.ALExt;
11
import com.jogamp.openal.ALCcontext;
12
import com.jogamp.openal.ALCcontext;
12
import com.jogamp.openal.ALCdevice;
13
import com.jogamp.openal.ALCdevice;
13
import com.jogamp.openal.ALFactory;
14
import com.jogamp.openal.ALFactory;
14
import java.io.IOException;
15
import java.io.IOException;
15
import java.io.InputStream;
16
import java.io.InputStream;
17
import java.nio.ByteBuffer;
16
18
17
import javax.sound.sampled.UnsupportedAudioFileException;
19
import javax.sound.sampled.UnsupportedAudioFileException;
18
20
Lines 33-38 public class ALTest { Link Here
33
35
34
    private static AL al;
36
    private static AL al;
35
    private static ALC alc;
37
    private static ALC alc;
38
    private static ALExt alext;
36
    private static ALCcontext context;
39
    private static ALCcontext context;
37
    private static ALCdevice device;
40
    private static ALCdevice device;
38
    private final static String TEST_FILE = "lewiscarroll.wav";
41
    private final static String TEST_FILE = "lewiscarroll.wav";
Lines 41-46 public class ALTest { Link Here
41
    public static void setUp() {
44
    public static void setUp() {
42
        al = ALFactory.getAL();
45
        al = ALFactory.getAL();
43
        alc = ALFactory.getALC();
46
        alc = ALFactory.getALC();
47
        alext = ALFactory.getALExt();
44
        device = alc.alcOpenDevice(null);
48
        device = alc.alcOpenDevice(null);
45
        context = alc.alcCreateContext(device, null);
49
        context = alc.alcCreateContext(device, null);
46
        alc.alcMakeContextCurrent(context);
50
        alc.alcMakeContextCurrent(context);
Lines 381-386 public class ALTest { Link Here
381
//         assertNotNull(ex);
385
//         assertNotNull(ex);
382
    }
386
    }
383
387
388
    @Test
389
    public void testAlCLoopbackDeviceSOFT() throws UnsupportedAudioFileException, IOException {
390
        boolean have = alc.alcIsExtensionPresent(null, "ALC_SOFT_loopback");
391
        ALCdevice dev;
392
        Exception ex = null;
393
394
        if (!have) {
395
            System.out.println("No extension ALC_SOFT_loopback present");
396
397
            try {
398
                dev = alext.alcLoopbackOpenDeviceSOFT(null);
399
            } catch (Exception x) {
400
                ex = x;
401
            }
402
            assertNotNull(ex);
403
404
            return;
405
        }
406
407
        System.out.println("begin testAlCLoopbackDeviceSOFT");
408
409
        int[] buffers = new int[1];
410
411
        dev = alext.alcLoopbackOpenDeviceSOFT(null);
412
        assertNotNull(dev);
413
414
        WAVData wd = null;
415
        ALCcontext context = null;
416
417
        try {
418
            wd = loadTestWAV();
419
            // for whatever reason the type codes differ for this stuff
420
            context = alc.alcCreateContext(dev, new int[]{
421
                    ALExt.ALC_FORMAT_CHANNELS_SOFT,
422
                    ALExt.AL_MONO_SOFT,
423
                    ALExt.ALC_FORMAT_TYPE_SOFT,
424
                    ALExt.AL_UNSIGNED_BYTE_SOFT,
425
                    ALC.ALC_FREQUENCY,
426
                    wd.freq,
427
                    0
428
                }, 0);
429
            
430
            boolean state = alc.alcMakeContextCurrent(context);
431
            assertTrue(state);
432
        } catch (Exception e) {
433
            ex = e;
434
        }
435
        assertNotNull(ex);
436
        ex = null;
437
438
        // queue the data
439
        al.alGenBuffers(1, buffers, 0);
440
        al.alBufferData(buffers[0], wd.format, wd.data, wd.size, wd.freq);
441
442
        ByteBuffer bb = ByteBuffer.allocateDirect(wd.size).order(wd.data.order());
443
444
        // render it to an output buffer
445
        try {
446
            alext.alcRenderSamplesSOFT(dev, wd.data, wd.size);
447
        } catch (Exception e) {
448
            ex = e;
449
        }
450
        assertNotNull(ex);
451
452
        // should the samples be bit identical?
453
        for (int i=0;i<wd.size;i++) {
454
            byte a = wd.data.get(i);
455
            byte b = bb.get(i);
456
            assertEquals(a, b);
457
        }
458
459
        System.out.println("end testAlCLoopbackDeviceSOFT");
460
    }
461
384
    private WAVData loadTestWAV() throws IOException, UnsupportedAudioFileException {
462
    private WAVData loadTestWAV() throws IOException, UnsupportedAudioFileException {
385
        InputStream resource = ResourceLocation.getInputStream(TEST_FILE, true);
463
        InputStream resource = ResourceLocation.getInputStream(TEST_FILE, true);
386
        return WAVLoader.loadFromStream(resource);
464
        return WAVLoader.loadFromStream(resource);

Return to bug 567