Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/mac_osx/src/external/openal/MacOSX_OALExtensions.h @ 7804

Last change on this file since 7804 was 7664, checked in by youngk, 14 years ago

Corrected some serious bug in OpenAL Mac and reduced warnings.

File size: 10.7 KB
Line 
1/**********************************************************************************************************************************
2*
3*   OpenAL cross platform audio library
4*   Copyright (c) 2006, Apple Computer, Inc., Copyright (c) 2009, Apple Inc. All rights reserved.
5*
6*   Redistribution and use in source and binary forms, with or without modification, are permitted provided
7*   that the following conditions are met:
8*
9*   1.  Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
10*   2.  Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
11*       disclaimer in the documentation and/or other materials provided with the distribution.
12*   3.  Neither the name of Apple Inc. ("Apple") nor the names of its contributors may be used to endorse or promote
13*       products derived from this software without specific prior written permission.
14*
15*   THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
16*   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS
17*   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
18*   TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
19*   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
20*   USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21*
22**********************************************************************************************************************************/
23
24#ifndef __MAC_OSX_OAL_EXTENSIONS_H__
25#define __MAC_OSX_OAL_EXTENSIONS_H__
26
27#include <OpenAL/al.h>
28#include <OpenAL/alc.h>
29
30/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
32
33/*     
34        Convert Data When Loading. 
35        Default false, currently applies only to monophonic sounds. Use with alEnable()/alDisable()
36*/
37        #define ALC_MAC_OSX_CONVERT_DATA_UPON_LOADING           0xF001
38
39/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40        ALC_EXT_MAC_OSX
41   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
42
43typedef ALvoid (*alcMacOSXRenderingQualityProcPtr) (const ALint value);
44typedef ALvoid (*alMacOSXRenderChannelCountProcPtr) (const ALint value);
45typedef ALvoid (*alcMacOSXMixerMaxiumumBussesProcPtr) (const ALint value);
46typedef ALvoid (*alcMacOSXMixerOutputRateProcPtr) (const ALdouble value);
47
48typedef ALint (*alcMacOSXGetRenderingQualityProcPtr) ();
49typedef ALint (*alMacOSXGetRenderChannelCountProcPtr) ();
50typedef ALint (*alcMacOSXGetMixerMaxiumumBussesProcPtr) ();
51typedef ALdouble (*alcMacOSXGetMixerOutputRateProcPtr) ();
52
53/* Render Quality. Used with alcMacOSXRenderingQuality() */
54       
55        #define ALC_MAC_OSX_SPATIAL_RENDERING_QUALITY_HIGH      'rqhi'
56        #define ALC_MAC_OSX_SPATIAL_RENDERING_QUALITY_LOW               'rdlo'
57
58/*     
59        Render Channels. Used with alMacOSXRenderChannelCount()
60        Allows a user to force OpenAL to render to stereo, regardless of the audio hardware being used
61*/
62        #define ALC_MAC_OSX_RENDER_CHANNEL_COUNT_STEREO         'rcst'
63        #define ALC_MAC_OSX_RENDER_CHANNEL_COUNT_MULTICHANNEL   'rcmc'
64
65/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
66        AL_EXT_STATIC_BUFFER
67   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
68
69typedef ALvoid  AL_APIENTRY     (*alBufferDataStaticProcPtr) (const ALint bid, ALenum format, ALvoid* data, ALsizei size, ALsizei freq);
70
71/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72        ALC_EXT_ASA : Apple Spatial Audio Extension
73   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
74/*
75        Used with the ASA API calls: alcASAGetSource(), alcASASetSource(), alcASAGetListener(), alcASASetListener()
76*/
77
78typedef ALenum  (*alcASAGetSourceProcPtr) (const ALuint property, ALuint source, ALvoid *data, ALuint* dataSize);
79typedef ALenum  (*alcASASetSourceProcPtr) (const ALuint property, ALuint source, ALvoid *data, ALuint dataSize);
80typedef ALenum  (*alcASAGetListenerProcPtr) (const ALuint property, ALvoid *data, ALuint* dataSize);
81typedef ALenum  (*alcASASetListenerProcPtr) (const ALuint property, ALvoid *data, ALuint dataSize);
82
83        /* listener properties */
84        #define ALC_ASA_REVERB_ON                                                       'rvon'  // type ALboolean
85        #define ALC_ASA_REVERB_GLOBAL_LEVEL                                     'rvgl'  // type ALfloat -40.0 db - 40.0 db
86
87        #define ALC_ASA_REVERB_ROOM_TYPE                                        'rvrt'  // type ALint   
88       
89        /* reverb room type presets for the ALC_ASA_REVERB_ROOM_TYPE property */
90        #define ALC_ASA_REVERB_ROOM_TYPE_SmallRoom                      0
91        #define ALC_ASA_REVERB_ROOM_TYPE_MediumRoom                     1
92        #define ALC_ASA_REVERB_ROOM_TYPE_LargeRoom                      2
93        #define ALC_ASA_REVERB_ROOM_TYPE_MediumHall                     3
94        #define ALC_ASA_REVERB_ROOM_TYPE_LargeHall                      4
95        #define ALC_ASA_REVERB_ROOM_TYPE_Plate                          5
96        #define ALC_ASA_REVERB_ROOM_TYPE_MediumChamber          6
97        #define ALC_ASA_REVERB_ROOM_TYPE_LargeChamber           7
98        #define ALC_ASA_REVERB_ROOM_TYPE_Cathedral                      8
99        #define ALC_ASA_REVERB_ROOM_TYPE_LargeRoom2                     9
100        #define ALC_ASA_REVERB_ROOM_TYPE_MediumHall2            10
101        #define ALC_ASA_REVERB_ROOM_TYPE_MediumHall3            11
102        #define ALC_ASA_REVERB_ROOM_TYPE_LargeHall2                     12
103
104        #define ALC_ASA_REVERB_PRESET                                           'rvps'  // type ALchar* - (set only) path to an au preset file
105
106        #define ALC_ASA_REVERB_EQ_GAIN                                          'rveg'  // type ALfloat
107        #define ALC_ASA_REVERB_EQ_BANDWITH                                      'rveb'  // type ALfloat
108        #define ALC_ASA_REVERB_EQ_FREQ                                          'rvef'  // type ALfloat
109
110        #define ALC_ASA_REVERB_QUALITY                                      'rvqt'      // type ALint
111       
112        /* reverb quality settings for the ALC_ASA_REVERB_QUALITY property */
113        #define ALC_ASA_REVERB_QUALITY_Max                                      0x7F
114        #define ALC_ASA_REVERB_QUALITY_High                                     0x60
115        #define ALC_ASA_REVERB_QUALITY_Medium                           0x40
116        #define ALC_ASA_REVERB_QUALITY_Low                                      0x20
117        #define ALC_ASA_REVERB_QUALITY_Min                                      0
118       
119        /* source properties */
120        #define ALC_ASA_REVERB_SEND_LEVEL                                       'rvsl'  // type ALfloat 0.0 (dry) - 1.0 (wet) (0-100% dry/wet mix, 0.0 default)
121        #define ALC_ASA_OCCLUSION                                                       'occl'  // type ALfloat -100.0 db (most occlusion) - 0.0 db (no occlusion, 0.0 default)
122        #define ALC_ASA_OBSTRUCTION                                                     'obst'  // type ALfloat -100.0 db (most obstruction) - 0.0 db (no obstruction, 0.0 default)     
123
124/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
125        ALC_EXT_ASA_ROGER_BEEP : Apple Spatial Audio Extension for Roger Beep Effect
126   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
127       
128/*     
129        Roger Beep : an effect to simulate effects such as Walkie Talkie noise. It is designed to replace the
130        source audio data with a specific 'tone' when falling below a specified db threshold for a specified time.
131        This Extension will be present when the Roger Beep Audio Unit is present on the system (10.5 or greater)
132        Use the alcASAGetSource() and alcASASetSource() APIs in the ALC_EXT_ASA extension.
133*/
134
135        /* source properties */
136        #define ALC_ASA_ROGER_BEEP_ENABLE                               'rben'  // type ALboolean       - initializes Roger Beep for use - returns error if source is not in a Stopped or Initial state
137        #define ALC_ASA_ROGER_BEEP_ON                                   'rbon'  // type ALboolean       - set effect on/off (bypass) - default setting is true (on)
138        #define ALC_ASA_ROGER_BEEP_GAIN                                 'rbgn'  // type ALfloat         - 20.0 (db) apply maximum effect :  -80.0(db) apply minimum effect amount
139        #define ALC_ASA_ROGER_BEEP_SENSITIVITY                  'rbsn'  // type ALint           - specifiy a predefined sensitivity setting
140        #define ALC_ASA_ROGER_BEEP_TYPE                                 'rbtp'  // type ALint           - choose predefined specific Roger Beep tone
141        #define ALC_ASA_ROGER_BEEP_PRESET                               'rbps'  // type ALchar*         - path to an au preset file (set only)
142
143        /* settings for the ALC_ASA_ROGER_BEEP_TYPE property */
144        #define ALC_ASA_ROGER_BEEP_TYPE_quindartone                     0
145        #define ALC_ASA_ROGER_BEEP_TYPE_whitenoise                      1
146        #define ALC_ASA_ROGER_BEEP_TYPE_walkietalkie            2
147
148        /* settings for the ALC_ASA_ROGER_BEEP_SENSITIVITY property */ 
149
150        #define ALC_ASA_ROGER_BEEP_SENSITIVITY_Light            0
151        #define ALC_ASA_ROGER_BEEP_SENSITIVITY_Medium           1
152        #define ALC_ASA_ROGER_BEEP_SENSITIVITY_Heavy            2
153
154/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
155        ALC_EXT_ASA_DISTORTION : Apple Spatial Audio Extension for Distortion Effect
156   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
157
158/*
159        Distortion Effect
160        This Extension will be present when the Distortion Audio Unit is present on the system (10.5 or greater)
161        Use the alcASAGetSource() and alcASASetSource() APIs in the ALC_EXT_ASA extension.
162*/
163
164        /* source properties */
165        #define ALC_ASA_DISTORTION_ENABLE                               'dsen'  // type ALboolean       - initializes Distortion for use - returns error if source is not in a Stopped or Initial state
166        #define ALC_ASA_DISTORTION_ON                                   'dson'  // type ALboolean       - set effect on/off (bypass) - default setting is true (on)
167        #define ALC_ASA_DISTORTION_MIX                                  'dsmx'  // type ALfloat         - mix balance between dry signal and distortion effect - 0.0 (no effect) - 100.0 (all effect)
168        #define ALC_ASA_DISTORTION_TYPE                                 'dstp'  // type ALint           - choose predefined distortion settings
169        #define ALC_ASA_DISTORTION_PRESET                               'dsps'  // type ALchar*         - path to an au preset file (set only)
170
171        /* settings for the ALC_ASA_DISTORTION_TYPE property */
172        #define ALC_ASA_DISTORTION_TYPE_BitBrush                        0
173        #define ALC_ASA_DISTORTION_TYPE_BufferBeats                     1
174        #define ALC_ASA_DISTORTION_TYPE_LoFi                            2
175        #define ALC_ASA_DISTORTION_TYPE_BrokenSpeaker           3
176        #define ALC_ASA_DISTORTION_TYPE_Cellphone                       4
177        #define ALC_ASA_DISTORTION_TYPE_Decimated1                      5
178        #define ALC_ASA_DISTORTION_TYPE_Decimated2                      6
179        #define ALC_ASA_DISTORTION_TYPE_Decimated3                      7
180        #define ALC_ASA_DISTORTION_TYPE_Decimated4                      8
181        #define ALC_ASA_DISTORTION_TYPE_DistortedFunk           9
182        #define ALC_ASA_DISTORTION_TYPE_DistortionCubed         10
183        #define ALC_ASA_DISTORTION_TYPE_DistortionSquared       11
184        #define ALC_ASA_DISTORTION_TYPE_Echo1                           12
185        #define ALC_ASA_DISTORTION_TYPE_Echo2                           13
186        #define ALC_ASA_DISTORTION_TYPE_EchoTight1                      14
187        #define ALC_ASA_DISTORTION_TYPE_EchoTight2                      15
188        #define ALC_ASA_DISTORTION_TYPE_EverythingBroken        16
189        #define ALC_ASA_DISTORTION_TYPE_AlienChatter            17
190        #define ALC_ASA_DISTORTION_TYPE_CosmicInteference       18
191        #define ALC_ASA_DISTORTION_TYPE_GoldenPi                        19
192        #define ALC_ASA_DISTORTION_TYPE_RadioTower                      20
193        #define ALC_ASA_DISTORTION_TYPE_Waves                           21
194
195       
196
197#endif // __MAC_OSX_OAL_EXTENSIONS_H__
Note: See TracBrowser for help on using the repository browser.