CDOpenALSupport.h 3.3 KB

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