root/trunk/ACPublic/ACCompatibility.h

Revision 65, 4.5 KB (checked in by gbooker, 16 months ago)

Upgraded Core Audio interface to later version (been meaning to commit this for quite a while)

Line 
1/*      Copyright ᅵ 2007 Apple Inc. All Rights Reserved.
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#if !defined __ACCOMPATIBILITY_H__
42#define __ACCOMPATIBILITY_H__
43
44#if TARGET_OS_MAC
45
46#include <AvailabilityMacros.h>
47
48#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__)
49#include <CoreAudio/CoreAudioTypes.h>
50#include <AudioUnit/AudioCodec.h>
51#else
52#include "CoreAudioTypes.h"
53#include "AudioCodec.h"
54#endif
55
56/* Redefine the following symbols only for Tiger */
57#if COREAUDIOTYPES_VERSION < 1050// && !defined(MAC_OS_X_VERSION_10_5)
58
59struct AudioFormatInfo
60{
61        AudioStreamBasicDescription             mASBD;
62        const void*                                             mMagicCookie;
63        UInt32                                                  mMagicCookieSize;
64};
65typedef struct AudioFormatInfo AudioFormatInfo;
66
67struct AudioFormatListItem
68{
69        AudioStreamBasicDescription             mASBD;
70        AudioChannelLayoutTag                   mChannelLayoutTag;
71};
72typedef struct AudioFormatListItem AudioFormatListItem;
73
74struct AudioCodecMagicCookieInfo
75{
76        UInt32                  mMagicCookieSize;
77        const void*             mMagicCookie;
78};
79typedef struct AudioCodecMagicCookieInfo        AudioCodecMagicCookieInfo;
80typedef struct AudioCodecMagicCookieInfo        MagicCookieInfo;
81
82
83enum
84{
85        /* Renamed properties */
86        kAudioCodecPropertyCurrentInputChannelLayout    = kAudioCodecPropertyInputChannelLayout,
87        kAudioCodecPropertyCurrentOutputChannelLayout   = kAudioCodecPropertyOutputChannelLayout,
88        kAudioCodecPropertyAvailableInputChannelLayoutTags      = kAudioCodecPropertyAvailableInputChannelLayouts,
89        kAudioCodecPropertyAvailableOutputChannelLayoutTags     = kAudioCodecPropertyAvailableOutputChannelLayouts,
90        kAudioCodecPropertyBitRateControlMode                   = kAudioCodecBitRateFormat,
91        kAudioCodecPropertyPaddedZeros                                  = kAudioCodecPropertyZeroFramesPadded,
92        kAudioCodecPropertyInputFormatsForOutputFormat  = kAudioCodecInputFormatsForOutputFormat,
93        kAudioCodecPropertyOutputFormatsForInputFormat  = kAudioCodecOutputFormatsForInputFormat,
94        kAudioCodecPropertyDoesSampleRateConversion             = kAudioCodecDoesSampleRateConversion
95};
96#else
97#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__)
98#include <AudioToolbox/AudioFormat.h>
99#else
100#include "AudioFormat.h"
101#endif
102
103#endif  // #if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
104
105#else
106        #include "AudioFormat.h"
107#endif  // #if TARGET_OS_MAC
108
109#endif  // #if !defined __ACCOMPATIBILITY_H__
Note: See TracBrowser for help on using the browser.