diff options
Diffstat (limited to 'libs/CocosDenshion/CDOpenALSupport.h')
-rwxr-xr-x | libs/CocosDenshion/CDOpenALSupport.h | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/libs/CocosDenshion/CDOpenALSupport.h b/libs/CocosDenshion/CDOpenALSupport.h new file mode 100755 index 0000000..661c69e --- /dev/null +++ b/libs/CocosDenshion/CDOpenALSupport.h | |||
@@ -0,0 +1,77 @@ | |||
1 | /* | ||
2 | |||
3 | Disclaimer: IMPORTANT: This Apple software is supplied to you by | ||
4 | Apple Inc. ("Apple") in consideration of your agreement to the | ||
5 | following terms, and your use, installation, modification or | ||
6 | redistribution of this Apple software constitutes acceptance of these | ||
7 | terms. If you do not agree with these terms, please do not use, | ||
8 | install, modify or redistribute this Apple software. | ||
9 | |||
10 | In consideration of your agreement to abide by the following terms, and | ||
11 | subject to these terms, Apple grants you a personal, non-exclusive | ||
12 | license, under Apple's copyrights in this original Apple software (the | ||
13 | "Apple Software"), to use, reproduce, modify and redistribute the Apple | ||
14 | Software, with or without modifications, in source and/or binary forms; | ||
15 | provided that if you redistribute the Apple Software in its entirety and | ||
16 | without modifications, you must retain this notice and the following | ||
17 | text and disclaimers in all such redistributions of the Apple Software. | ||
18 | Neither the name, trademarks, service marks or logos of Apple Inc. | ||
19 | may be used to endorse or promote products derived from the Apple | ||
20 | Software without specific prior written permission from Apple. Except | ||
21 | as expressly stated in this notice, no other rights or licenses, express | ||
22 | or implied, are granted by Apple herein, including but not limited to | ||
23 | any patent rights that may be infringed by your derivative works or by | ||
24 | other works in which the Apple Software may be incorporated. | ||
25 | |||
26 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE | ||
27 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION | ||
28 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS | ||
29 | FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND | ||
30 | OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. | ||
31 | |||
32 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL | ||
33 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
34 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
35 | INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, | ||
36 | MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED | ||
37 | AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), | ||
38 | STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE | ||
39 | POSSIBILITY OF SUCH DAMAGE. | ||
40 | |||
41 | Copyright (C) 2009 Apple Inc. All Rights Reserved. | ||
42 | |||
43 | $Id$ | ||
44 | */ | ||
45 | |||
46 | /* | ||
47 | This file contains code from version 1.1 and 1.4 of MyOpenALSupport.h taken from Apple's oalTouch version. | ||
48 | The 1.4 version code is used for loading IMA4 files, however, this code causes very noticeable clicking | ||
49 | when used to load wave files that are looped so the 1.1 version code is used specifically for loading | ||
50 | wav files. | ||
51 | */ | ||
52 | |||
53 | #ifndef __CD_OPENAL_H | ||
54 | #define __CD_OPENAL_H | ||
55 | |||
56 | #ifdef __cplusplus | ||
57 | extern "C" { | ||
58 | #endif | ||
59 | |||
60 | |||
61 | #import <OpenAL/al.h> | ||
62 | #import <OpenAL/alc.h> | ||
63 | #import <CoreFoundation/CFURL.h> | ||
64 | |||
65 | |||
66 | //Taken from oalTouch MyOpenALSupport 1.1 | ||
67 | void* CDloadWaveAudioData(CFURLRef inFileURL, ALsizei *outDataSize, ALenum *outDataFormat, ALsizei* outSampleRate); | ||
68 | void* CDloadCafAudioData(CFURLRef inFileURL, ALsizei *outDataSize, ALenum *outDataFormat, ALsizei* outSampleRate); | ||
69 | void* CDGetOpenALAudioData(CFURLRef inFileURL, ALsizei *outDataSize, ALenum *outDataFormat, ALsizei* outSampleRate); | ||
70 | |||
71 | #ifdef __cplusplus | ||
72 | } | ||
73 | #endif | ||
74 | |||
75 | #endif | ||
76 | |||
77 | |||