1 {==================================================================================================
2     File:       CoreAudio/CoreAudioTypes.h
3 
4     Contains:   Definitions types common to the Core Audio APIs
5 
6     Copyright:  (c) 1985-2010 by Apple, Inc., all rights reserved.
7 
8     Bugs?:      For bug reports, consult the following page on
9                  the World Wide Web:
10 
11                      http://bugs.freepascal.org
12 
13 ==================================================================================================}
14 {  Pascal Translation:  Gale R Paeper, <gpaeper@empirenet.com>, 2006 }
15 {  Pascal Translation Updated:  Jonas Maebe, <jonas@freepascal.org>, October 2009 }
16 {  Pascal Translation Updated:  Jonas Maebe, <jonas@freepascal.org>, October 2012 }
17 {
18     Modified for use with Free Pascal
19     Version 308
20     Please report any bugs to <gpc@microbizz.nl>
21 }
22 
23 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
24 {$mode macpas}
25 {$modeswitch cblocks}
26 {$packenum 1}
27 {$macro on}
28 {$inline on}
29 {$calling mwpascal}
30 
31 unit CoreAudioTypes;
32 interface
33 {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
34 {$setc GAP_INTERFACES_VERSION := $0308}
35 
36 {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
37     {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
38 {$endc}
39 
40 {$ifc defined CPUPOWERPC and defined CPUI386}
41 	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
42 {$endc}
43 {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
44 	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
45 {$endc}
46 
47 {$ifc not defined __ppc__ and defined CPUPOWERPC32}
48 	{$setc __ppc__ := 1}
49 {$elsec}
50 	{$setc __ppc__ := 0}
51 {$endc}
52 {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
53 	{$setc __ppc64__ := 1}
54 {$elsec}
55 	{$setc __ppc64__ := 0}
56 {$endc}
57 {$ifc not defined __i386__ and defined CPUI386}
58 	{$setc __i386__ := 1}
59 {$elsec}
60 	{$setc __i386__ := 0}
61 {$endc}
62 {$ifc not defined __x86_64__ and defined CPUX86_64}
63 	{$setc __x86_64__ := 1}
64 {$elsec}
65 	{$setc __x86_64__ := 0}
66 {$endc}
67 {$ifc not defined __arm__ and defined CPUARM}
68 	{$setc __arm__ := 1}
69 {$elsec}
70 	{$setc __arm__ := 0}
71 {$endc}
72 {$ifc not defined __arm64__ and defined CPUAARCH64}
73   {$setc __arm64__ := 1}
74 {$elsec}
75   {$setc __arm64__ := 0}
76 {$endc}
77 
78 {$ifc defined cpu64}
79   {$setc __LP64__ := 1}
80 {$elsec}
81   {$setc __LP64__ := 0}
82 {$endc}
83 
84 
85 {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
86 	{$error Conflicting definitions for __ppc__ and __i386__}
87 {$endc}
88 
89 {$ifc defined __ppc__ and __ppc__}
90 	{$setc TARGET_CPU_PPC := TRUE}
91 	{$setc TARGET_CPU_PPC64 := FALSE}
92 	{$setc TARGET_CPU_X86 := FALSE}
93 	{$setc TARGET_CPU_X86_64 := FALSE}
94 	{$setc TARGET_CPU_ARM := FALSE}
95 	{$setc TARGET_CPU_ARM64 := FALSE}
96 	{$setc TARGET_OS_MAC := TRUE}
97 	{$setc TARGET_OS_IPHONE := FALSE}
98 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
99 	{$setc TARGET_OS_EMBEDDED := FALSE}
100 {$elifc defined __ppc64__ and __ppc64__}
101 	{$setc TARGET_CPU_PPC := FALSE}
102 	{$setc TARGET_CPU_PPC64 := TRUE}
103 	{$setc TARGET_CPU_X86 := FALSE}
104 	{$setc TARGET_CPU_X86_64 := FALSE}
105 	{$setc TARGET_CPU_ARM := FALSE}
106 	{$setc TARGET_CPU_ARM64 := FALSE}
107 	{$setc TARGET_OS_MAC := TRUE}
108 	{$setc TARGET_OS_IPHONE := FALSE}
109 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
110 	{$setc TARGET_OS_EMBEDDED := FALSE}
111 {$elifc defined __i386__ and __i386__}
112 	{$setc TARGET_CPU_PPC := FALSE}
113 	{$setc TARGET_CPU_PPC64 := FALSE}
114 	{$setc TARGET_CPU_X86 := TRUE}
115 	{$setc TARGET_CPU_X86_64 := FALSE}
116 	{$setc TARGET_CPU_ARM := FALSE}
117 	{$setc TARGET_CPU_ARM64 := FALSE}
118 {$ifc defined iphonesim}
119  	{$setc TARGET_OS_MAC := FALSE}
120 	{$setc TARGET_OS_IPHONE := TRUE}
121 	{$setc TARGET_IPHONE_SIMULATOR := TRUE}
122 {$elsec}
123 	{$setc TARGET_OS_MAC := TRUE}
124 	{$setc TARGET_OS_IPHONE := FALSE}
125 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
126 {$endc}
127 	{$setc TARGET_OS_EMBEDDED := FALSE}
128 {$elifc defined __x86_64__ and __x86_64__}
129 	{$setc TARGET_CPU_PPC := FALSE}
130 	{$setc TARGET_CPU_PPC64 := FALSE}
131 	{$setc TARGET_CPU_X86 := FALSE}
132 	{$setc TARGET_CPU_X86_64 := TRUE}
133 	{$setc TARGET_CPU_ARM := FALSE}
134 	{$setc TARGET_CPU_ARM64 := FALSE}
135 {$ifc defined iphonesim}
136  	{$setc TARGET_OS_MAC := FALSE}
137 	{$setc TARGET_OS_IPHONE := TRUE}
138 	{$setc TARGET_IPHONE_SIMULATOR := TRUE}
139 {$elsec}
140 	{$setc TARGET_OS_MAC := TRUE}
141 	{$setc TARGET_OS_IPHONE := FALSE}
142 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
143 {$endc}
144 	{$setc TARGET_OS_EMBEDDED := FALSE}
145 {$elifc defined __arm__ and __arm__}
146 	{$setc TARGET_CPU_PPC := FALSE}
147 	{$setc TARGET_CPU_PPC64 := FALSE}
148 	{$setc TARGET_CPU_X86 := FALSE}
149 	{$setc TARGET_CPU_X86_64 := FALSE}
150 	{$setc TARGET_CPU_ARM := TRUE}
151 	{$setc TARGET_CPU_ARM64 := FALSE}
152 	{$setc TARGET_OS_MAC := FALSE}
153 	{$setc TARGET_OS_IPHONE := TRUE}
154 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
155 	{$setc TARGET_OS_EMBEDDED := TRUE}
156 {$elifc defined __arm64__ and __arm64__}
157 	{$setc TARGET_CPU_PPC := FALSE}
158 	{$setc TARGET_CPU_PPC64 := FALSE}
159 	{$setc TARGET_CPU_X86 := FALSE}
160 	{$setc TARGET_CPU_X86_64 := FALSE}
161 	{$setc TARGET_CPU_ARM := FALSE}
162 	{$setc TARGET_CPU_ARM64 := TRUE}
163 {$ifc defined ios}
164 	{$setc TARGET_OS_MAC := FALSE}
165 	{$setc TARGET_OS_IPHONE := TRUE}
166 	{$setc TARGET_OS_EMBEDDED := TRUE}
167 {$elsec}
168 	{$setc TARGET_OS_MAC := TRUE}
169 	{$setc TARGET_OS_IPHONE := FALSE}
170 	{$setc TARGET_OS_EMBEDDED := FALSE}
171 {$endc}
172 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
173 {$elsec}
174 	{$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
175 {$endc}
176 
177 {$ifc defined __LP64__ and __LP64__ }
178   {$setc TARGET_CPU_64 := TRUE}
179 {$elsec}
180   {$setc TARGET_CPU_64 := FALSE}
181 {$endc}
182 
183 {$ifc defined FPC_BIG_ENDIAN}
184 	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
185 	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
186 {$elifc defined FPC_LITTLE_ENDIAN}
187 	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
188 	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
189 {$elsec}
190 	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
191 {$endc}
192 {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
193 {$setc CALL_NOT_IN_CARBON := FALSE}
194 {$setc OLDROUTINENAMES := FALSE}
195 {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
196 {$setc OPAQUE_UPP_TYPES := TRUE}
197 {$setc OTCARBONAPPLICATION := TRUE}
198 {$setc OTKERNEL := FALSE}
199 {$setc PM_USE_SESSION_APIS := TRUE}
200 {$setc TARGET_API_MAC_CARBON := TRUE}
201 {$setc TARGET_API_MAC_OS8 := FALSE}
202 {$setc TARGET_API_MAC_OSX := TRUE}
203 {$setc TARGET_CARBON := TRUE}
204 {$setc TARGET_CPU_68K := FALSE}
205 {$setc TARGET_CPU_MIPS := FALSE}
206 {$setc TARGET_CPU_SPARC := FALSE}
207 {$setc TARGET_OS_UNIX := FALSE}
208 {$setc TARGET_OS_WIN32 := FALSE}
209 {$setc TARGET_RT_MAC_68881 := FALSE}
210 {$setc TARGET_RT_MAC_CFM := FALSE}
211 {$setc TARGET_RT_MAC_MACHO := TRUE}
212 {$setc TYPED_FUNCTION_POINTERS := TRUE}
213 {$setc TYPE_BOOL := FALSE}
214 {$setc TYPE_EXTENDED := FALSE}
215 {$setc TYPE_LONGLONG := TRUE}
216 uses MacTypes;
217 {$endc} {not MACOSALLINCLUDE}
218 
219 {$ALIGN POWER}
220 
221 {!
222     @header CoreAudioTypes
223     This header defines the types and constants that all the CoreAudio APIs have in common.
224 }
225 
226 //==================================================================================================
227 
228 const
229 	COREAUDIOTYPES_VERSION = 1051;
230 
231 
232 {$ifc not defined(CA_PREFER_FIXED_POINT)}
233     {$ifc TARGET_OS_IPHONE}
234         {$ifc (TARGET_CPU_X86 or TARGET_CPU_X86_64 or TARGET_CPU_PPC or TARGET_CPU_PPC64) and not TARGET_IPHONE_SIMULATOR}
235             {$setc CA_PREFER_FIXED_POINT := 0}
236         {$elsec}
237             {$setc CA_PREFER_FIXED_POINT := 1}
238         {$endc}
239     {$elsec}
240         {$setc CA_PREFER_FIXED_POINT := 0}
241     {$endc}
242 {$endc}
243 
244 
245 //==================================================================================================
246 
247 {!
248     @enum           General Audio error codes
249     @abstract       These are the error codes returned from the APIs found through Core Audio related frameworks.
250     @constant       kAudio_UnimplementedError
251                         Unimplemented core routine.
252     @constant       kAudio_FileNotFoundError
253                         File not found.
254     @constant       kAudio_ParamError
255                         Error in user parameter list.
256     @constant       kAudio_MemFullError
257                         Not enough room in heap zone.
258 }
259 
260 const
261 	kAudio_UnimplementedError = -4;
262 	kAudio_FileNotFoundError = -43;
263 	kAudio_ParamError = -50;
264 	kAudio_MemFullError = -108;
265 
266 //==================================================================================================
267 
268 {!
269     @struct         AudioValueRange
270     @abstract       This structure holds a pair of numbers that represent a continuous range of
271                     values.
272     @field          mMinimum
273                         The minimum value.
274     @field          mMaximum
275                         The maximum value.
276 }
277 type
278 	AudioValueRange = record
279 		mMinimum: Float64;
280 		mMaximum: Float64;
281 	end;
282 
283 {!
284     @struct         AudioValueTranslation
285     @abstract       This stucture holds the buffers necessary for translation operations.
286     @field          mInputData
287                         The buffer containing the data to be translated.
288     @field          mInputDataSize
289                         The number of bytes in the buffer pointed at by mInputData.
290     @field          mOutputData
291                         The buffer to hold the result of the translation.
292     @field          mOutputDataSize
293                         The number of bytes in the buffer pointed at by mOutputData.
294 }
295 type
296 	AudioValueTranslation = record
297 		mInputData: UnivPtr;
298 		mInputDataSize: UInt32;
299 		mOutputData: UnivPtr;
300 		mOutputDataSize: UInt32;
301 	end;
302 
303 {!
304     @struct         AudioBuffer
305     @abstract       A structure to hold a buffer of audio data.
306     @field          mNumberChannels
307                         The number of interleaved channels in the buffer.
308     @field          mDataByteSize
309                         The number of bytes in the buffer pointed at by mData.
310     @field          mData
311                         A pointer to the buffer of audio data.
312 }
313 type
314 	AudioBuffer = record
315 		mNumberChannels: UInt32;
316 		mDataByteSize: UInt32;
317 		mData: UnivPtr;
318 	end;
319 
320 {!
321     @struct         AudioBufferList
322     @abstract       A variable length array of AudioBuffer structures.
323     @field          mNumberBuffers
324                         The number of AudioBuffers in the mBuffers array.
325     @field          mBuffers
326                         A variable length array of AudioBuffers.
327 }
328 type
329 	AudioBufferListPtr = ^AudioBufferList;
330 	AudioBufferListPtrPtr = ^AudioBufferListPtr;
331 	AudioBufferList = record
332 		mNumberBuffers: UInt32;
333 		mBuffers: array[0..0] of AudioBuffer;
334 	end;
335 
336 {!
337     @typedef        AudioSampleType
338     @abstract       The canonical audio sample type used by the various CoreAudio APIs
339 }
340 {$ifc not CA_PREFER_FIXED_POINT}
341 type
342 	AudioSampleType = Float32;
343 	AudioUnitSampleType = Float32;
344 {$elsec} {not CA_PREFER_FIXED_POINT}
345 type
346 	AudioSampleType = SInt16;
347 	AudioUnitSampleType = SInt32;
348 const
349 	kAudioUnitSampleFractionBits = 24;
350 {$endc} {not CA_PREFER_FIXED_POINT}
351 
352 {!
353     @struct         AudioStreamBasicDescription
354     @abstract       This structure encapsulates all the information for describing the basic
355                     format properties of a stream of audio data.
356     @discussion     This structure is sufficient to describe any constant bit rate format that  has
357                     channels that are the same size. Extensions are required for variable bit rate
358                     data and for constant bit rate data where the channels have unequal sizes.
359                     However, where applicable, the appropriate fields will be filled out correctly
360                     for these kinds of formats (the extra data is provided via separate properties).
361                     In all fields, a value of 0 indicates that the field is either unknown, not
362                     applicable or otherwise is inapproprate for the format and should be ignored.
363                     Note that 0 is still a valid value for most formats in the mFormatFlags field.
364 
365                     In audio data a frame is one sample across all channels. In non-interleaved
366                     audio, the per frame fields identify one channel. In interleaved audio, the per
367                     frame fields identify the set of n channels. In uncompressed audio, a Packet is
368                     one frame, (mFramesPerPacket == 1). In compressed audio, a Packet is an
369                     indivisible chunk of compressed data, for example an AAC packet will contain
370                     1024 sample frames.
371     @field          mSampleRate
372                         The number of sample frames per second of the data in the stream.
373     @field          mFormatID
374                         A four char code indicating the general kind of data in the stream.
375     @field          mFormatFlags
376                         Flags specific to each format.
377     @field          mBytesPerPacket
378                         The number of bytes in a packet of data.
379     @field          mFramesPerPacket
380                         The number of sample frames in each packet of data.
381     @field          mBytesPerFrame
382                         The number of bytes in a single sample frame of data.
383     @field          mChannelsPerFrame
384                         The number of channels in each frame of data.
385     @field          mBitsPerChannel
386                         The number of bits of sample data for each channel in a frame of data.
387     @field          mReserved
388                         Pads the structure out to force an even 8 byte alignment.
389 }
390 type
391 	AudioStreamBasicDescription = record
392 		mSampleRate: Float64;
393 		mFormatID: UInt32;
394 		mFormatFlags: UInt32;
395 		mBytesPerPacket: UInt32;
396 		mFramesPerPacket: UInt32;
397 		mBytesPerFrame: UInt32;
398 		mChannelsPerFrame: UInt32;
399 		mBitsPerChannel: UInt32;
400 		mReserved: UInt32;
401 	end;
402 	AudioStreamBasicDescriptionPTr = ^AudioStreamBasicDescription;
403 
404 {!
405     @enum           AudioStreamBasicDescription Constants
406     @abstract       Constants for use with AudioStreamBasicDescription
407     @constant       kAudioStreamAnyRate
408                         The format can use any sample rate. Note that this constant can only appear
409                         in listings of supported formats. It will never appear in a current format.
410 }
411 const
412 	kAudioStreamAnyRate = 0;
413 
414 {!
415     @enum           Format IDs
416     @abstract       The four char code IDs used to identify individual formats of audio data.
417     @constant       kAudioFormatLinearPCM
418                         Linear PCM, uses the standard flags.
419     @constant       kAudioFormatAC3
420                         AC-3, has no flags.
421     @constant       kAudioFormat60958AC3
422                         AC-3 packaged for transport over an IEC 60958 compliant digital audio
423                         interface. Uses the standard flags.
424     @constant       kAudioFormatAppleIMA4
425                         Apples implementation of IMA 4:1 ADPCM, has no flags.
426     @constant       kAudioFormatMPEG4AAC
427                         MPEG-4 Low Complexity AAC audio object, has no flags.
428     @constant       kAudioFormatMPEG4CELP
429                         MPEG-4 CELP audio object, has no flags.
430     @constant       kAudioFormatMPEG4HVXC
431                         MPEG-4 HVXC audio object, has no flags.
432     @constant       kAudioFormatMPEG4TwinVQ
433                         MPEG-4 TwinVQ audio object type, has no flags.
434     @constant       kAudioFormatMACE3
435                         MACE 3:1, has no flags.
436     @constant       kAudioFormatMACE6
437                         MACE 6:1, has no flags.
438     @constant       kAudioFormatULaw
439                         �Law 2:1, has no flags.
440     @constant       kAudioFormatALaw
441                         aLaw 2:1, has no flags.
442     @constant       kAudioFormatQDesign
443                         QDesign music, has no flags
444     @constant       kAudioFormatQDesign2
445                         QDesign2 music, has no flags
446     @constant       kAudioFormatQUALCOMM
447                         QUALCOMM PureVoice, has no flags
448     @constant       kAudioFormatMPEGLayer1
449                         MPEG-1/2, Layer 1 audio, has no flags
450     @constant       kAudioFormatMPEGLayer2
451                         MPEG-1/2, Layer 2 audio, has no flags
452     @constant       kAudioFormatMPEGLayer3
453                         MPEG-1/2, Layer 3 audio, has no flags
454     @constant       kAudioFormatTimeCode
455                         A stream of IOAudioTimeStamps, uses the IOAudioTimeStamp flags (see
456                         IOKit/audio/IOAudioTypes.h).
457     @constant       kAudioFormatMIDIStream
458                         A stream of MIDIPacketLists where the time stamps in the MIDIPacketList are
459                         sample offsets in the stream. The mSampleRate field is used to describe how
460                         time is passed in this kind of stream and an AudioUnit that receives or
461                         generates this stream can use this sample rate, the number of frames it is
462                         rendering and the sample offsets within the MIDIPacketList to define the
463                         time for any MIDI event within this list. It has no flags.
464     @constant       kAudioFormatParameterValueStream
465                         A "side-chain" of Float32 data that can be fed or generated by an AudioUnit
466                         and is used to send a high density of parameter value control information.
467                         An AU will typically run a ParameterValueStream at either the sample rate of
468                         the AudioUnit's audio data, or some integer divisor of this (say a half or a
469                         third of the sample rate of the audio). The Sample Rate of the ASBD
470                         describes this relationship. It has no flags.
471     @constant       kAudioFormatAppleLossless
472                         Apple Lossless, the flags indicate the bit depth of the source material.
473     @constant       kAudioFormatMPEG4AAC_HE
474                         MPEG-4 High Efficiency AAC audio object, has no flags.
475     @constant       kAudioFormatMPEG4AAC_LD
476                         MPEG-4 AAC Low Delay audio object, has no flags.
477     @constant       kAudioFormatMPEG4AAC_ELD
478                         MPEG-4 AAC Enhanced Low Delay audio object, has no flags. This is the formatID of
479                         the base layer without the SBR extension. See also kAudioFormatMPEG4AAC_ELD_SBR
480     @constant       kAudioFormatMPEG4AAC_ELD_SBR
481                         MPEG-4 AAC Enhanced Low Delay audio object with SBR extension layer, has no flags.
482     @constant       kAudioFormatMPEG4AAC_HE_V2
483                         MPEG-4 High Efficiency AAC Version 2 audio object, has no flags.
484     @constant       kAudioFormatMPEG4AAC_Spatial
485                         MPEG-4 Spatial Audio audio object, has no flags.
486     @constant       kAudioFormatAMR
487                         The AMR Narrow Band speech codec.
488     @constant       kAudioFormatAudible
489                         The format used for Audible audio books. It has no flags.
490     @constant       kAudioFormatiLBC
491                         The iLBC narrow band speech codec. It has no flags.
492     @constant       kAudioFormatDVIIntelIMA
493                         DVI/Intel IMA ADPCM - ACM code 17.
494     @constant       kAudioFormatMicrosoftGSM
495                         Microsoft GSM 6.10 - ACM code 49.
496     @constant       kAudioFormatAES3
497                         This format is defined by AES3-2003, and adopted into MXF and MPEG-2
498                         containers and SDTI transport streams with SMPTE specs 302M-2002 and
499                         331M-2000. It has no flags.
500 }
501 const
502 	kAudioFormatLinearPCM = FourCharCode('lpcm');
503 	kAudioFormatAC3 = FourCharCode('ac-3');
504 	kAudioFormat60958AC3 = FourCharCode('cac3');
505 	kAudioFormatAppleIMA4 = FourCharCode('ima4');
506 	kAudioFormatMPEG4AAC = FourCharCode('aac ');
507 	kAudioFormatMPEG4CELP = FourCharCode('celp');
508 	kAudioFormatMPEG4HVXC = FourCharCode('hvxc');
509 	kAudioFormatMPEG4TwinVQ = FourCharCode('twvq');
510 	kAudioFormatMACE3 = FourCharCode('MAC3');
511 	kAudioFormatMACE6 = FourCharCode('MAC6');
512 	kAudioFormatULaw = FourCharCode('ulaw');
513 	kAudioFormatALaw = FourCharCode('alaw');
514 	kAudioFormatQDesign = FourCharCode('QDMC');
515 	kAudioFormatQDesign2 = FourCharCode('QDM2');
516 	kAudioFormatQUALCOMM = FourCharCode('Qclp');
517 	kAudioFormatMPEGLayer1 = FourCharCode('.mp1');
518 	kAudioFormatMPEGLayer2 = FourCharCode('.mp2');
519 	kAudioFormatMPEGLayer3 = FourCharCode('.mp3');
520 	kAudioFormatTimeCode = FourCharCode('time');
521 	kAudioFormatMIDIStream = FourCharCode('midi');
522 	kAudioFormatParameterValueStream = FourCharCode('apvs');
523 	kAudioFormatAppleLossless = FourCharCode('alac');
524 	kAudioFormatMPEG4AAC_HE = FourCharCode('aach');
525 	kAudioFormatMPEG4AAC_LD = FourCharCode('aacl');
526 	kAudioFormatMPEG4AAC_ELD = FourCharCode('aace');
527 	kAudioFormatMPEG4AAC_ELD_SBR = FourCharCode('aacf');
528 	kAudioFormatMPEG4AAC_ELD_V2 = FourCharCode('aacg');
529 	kAudioFormatMPEG4AAC_HE_V2 = FourCharCode('aacp');
530 	kAudioFormatMPEG4AAC_Spatial = FourCharCode('aacs');
531 	kAudioFormatAMR = FourCharCode('samr');
532 	kAudioFormatAudible = FourCharCode('AUDB');
533 	kAudioFormatiLBC = FourCharCode('ilbc');
534 	kAudioFormatDVIIntelIMA = $6D730011;
535 	kAudioFormatMicrosoftGSM = $6D730031;
536 	kAudioFormatAES3 = FourCharCode('aes3');
537 
538 {!
539     @enum           Standard Flag Values for AudioStreamBasicDescription
540     @abstract       These are the standard flags for use in the mFormatFlags field of the
541                     AudioStreamBasicDescription structure.
542     @discussion     Typically, when an ASBD is being used, the fields describe the complete layout
543                     of the sample data in the buffers that are represented by this description -
544                     where typically those buffers are represented by an AudioBuffer that is
545                     contained in an AudioBufferList.
546 
547                     However, when an ASBD has the kAudioFormatFlagIsNonInterleaved flag, the
548                     AudioBufferList has a different structure and semantic. In this case, the ASBD
549                     fields will describe the format of ONE of the AudioBuffers that are contained in
550                     the list, AND each AudioBuffer in the list is determined to have a single (mono)
551                     channel of audio data. Then, the ASBD's mChannelsPerFrame will indicate the
552                     total number of AudioBuffers that are contained within the AudioBufferList -
553                     where each buffer contains one channel. This is used primarily with the
554                     AudioUnit (and AudioConverter) representation of this list - and won't be found
555                     in the AudioHardware usage of this structure.
556     @constant       kAudioFormatFlagIsFloat
557                         Set for floating point, clear for integer.
558     @constant       kAudioFormatFlagIsBigEndian
559                         Set for big endian, clear for little endian.
560     @constant       kAudioFormatFlagIsSignedInteger
561                         Set for signed integer, clear for unsigned integer. This is only valid if
562                         kAudioFormatFlagIsFloat is clear.
563     @constant       kAudioFormatFlagIsPacked
564                         Set if the sample bits occupy the entire available bits for the channel,
565                         clear if they are high or low aligned within the channel. Note that even if
566                         this flag is clear, it is implied that this flag is set if the
567                         AudioStreamBasicDescription is filled out such that the fields have the
568                         following relationship:
569                            ((mBitsPerSample / 8) * mChannelsPerFrame) == mBytesPerFrame
570     @constant       kAudioFormatFlagIsAlignedHigh
571                         Set if the sample bits are placed into the high bits of the channel, clear
572                         for low bit placement. This is only valid if kAudioFormatFlagIsPacked is
573                         clear.
574     @constant       kAudioFormatFlagIsNonInterleaved
575                         Set if the samples for each channel are located contiguously and the
576                         channels are layed out end to end, clear if the samples for each frame are
577                         layed out contiguously and the frames layed out end to end.
578     @constant       kAudioFormatFlagIsNonMixable
579                         Set to indicate when a format is non-mixable. Note that this flag is only
580                         used when interacting with the HAL's stream format information. It is not a
581                         valid flag for any other uses.
582     @constant       kAudioFormatFlagsAreAllClear
583                         Set if all the flags would be clear in order to preserve 0 as the wild card
584                         value.
585     @constant       kLinearPCMFormatFlagIsFloat
586                         Synonym for kAudioFormatFlagIsFloat.
587     @constant       kLinearPCMFormatFlagIsBigEndian
588                         Synonym for kAudioFormatFlagIsBigEndian.
589     @constant       kLinearPCMFormatFlagIsSignedInteger
590                         Synonym for kAudioFormatFlagIsSignedInteger.
591     @constant       kLinearPCMFormatFlagIsPacked
592                         Synonym for kAudioFormatFlagIsPacked.
593     @constant       kLinearPCMFormatFlagIsAlignedHigh
594                         Synonym for kAudioFormatFlagIsAlignedHigh.
595     @constant       kLinearPCMFormatFlagIsNonInterleaved
596                         Synonym for kAudioFormatFlagIsNonInterleaved.
597     @constant       kLinearPCMFormatFlagIsNonMixable
598                         Synonym for kAudioFormatFlagIsNonMixable.
599     @constant       kLinearPCMFormatFlagsAreAllClear
600                         Synonym for kAudioFormatFlagsAreAllClear.
601     @constant       kLinearPCMFormatFlagsSampleFractionShift
602                         The linear PCM flags contain a 6-bit bitfield indicating that an integer
603                         format is to be interpreted as fixed point. The value indicates the number
604                         of bits are used to represent the fractional portion of each sample value.
605                         This constant indicates the bit position (counting from the right) of the
606                         bitfield in mFormatFlags.
607     @constant       kLinearPCMFormatFlagsSampleFractionMask
608                         number_fractional_bits = (mFormatFlags &
609                         kLinearPCMFormatFlagsSampleFractionMask) >>
610                         kLinearPCMFormatFlagsSampleFractionShift
611     @constant       kAppleLosslessFormatFlag_16BitSourceData
612                         This flag is set for Apple Lossless data that was sourced from 16 bit native
613                         endian signed integer data.
614     @constant       kAppleLosslessFormatFlag_20BitSourceData
615                         This flag is set for Apple Lossless data that was sourced from 20 bit native
616                         endian signed integer data aligned high in 24 bits.
617     @constant       kAppleLosslessFormatFlag_24BitSourceData
618                         This flag is set for Apple Lossless data that was sourced from 24 bit native
619                         endian signed integer data.
620     @constant       kAppleLosslessFormatFlag_32BitSourceData
621                         This flag is set for Apple Lossless data that was sourced from 32 bit native
622                         endian signed integer data.
623 }
624 const
625 	kAudioFormatFlagIsFloat = 1 shl 0;     // 0x1
626 	kAudioFormatFlagIsBigEndian = 1 shl 1;     // 0x2
627 	kAudioFormatFlagIsSignedInteger = 1 shl 2;     // 0x4
628 	kAudioFormatFlagIsPacked = 1 shl 3;     // 0x8
629 	kAudioFormatFlagIsAlignedHigh = 1 shl 4;     // 0x10
630 	kAudioFormatFlagIsNonInterleaved = 1 shl 5;     // 0x20
631 	kAudioFormatFlagIsNonMixable = 1 shl 6;     // 0x40
632 	kAudioFormatFlagsAreAllClear = 1 shl 31;
633 	kLinearPCMFormatFlagIsFloat = kAudioFormatFlagIsFloat;
634 	kLinearPCMFormatFlagIsBigEndian = kAudioFormatFlagIsBigEndian;
635 	kLinearPCMFormatFlagIsSignedInteger = kAudioFormatFlagIsSignedInteger;
636 	kLinearPCMFormatFlagIsPacked = kAudioFormatFlagIsPacked;
637 	kLinearPCMFormatFlagIsAlignedHigh = kAudioFormatFlagIsAlignedHigh;
638 	kLinearPCMFormatFlagIsNonInterleaved = kAudioFormatFlagIsNonInterleaved;
639 	kLinearPCMFormatFlagIsNonMixable = kAudioFormatFlagIsNonMixable;
640 	kLinearPCMFormatFlagsSampleFractionShift = 7;
641 	kLinearPCMFormatFlagsSampleFractionMask = $3F shl kLinearPCMFormatFlagsSampleFractionShift;
642 	kLinearPCMFormatFlagsAreAllClear = kAudioFormatFlagsAreAllClear;
643 	kAppleLosslessFormatFlag_16BitSourceData = 1;
644 	kAppleLosslessFormatFlag_20BitSourceData = 2;
645 	kAppleLosslessFormatFlag_24BitSourceData = 3;
646 	kAppleLosslessFormatFlag_32BitSourceData = 4;
647 
648 {!
649     @enum           Commonly Used Combinations of ASBD Flags
650     @abstract       Some commonly used combinations of flags for AudioStreamBasicDescriptions.
651     @constant       kAudioFormatFlagsNativeEndian
652                         Defined to set or clear kAudioFormatFlagIsBigEndian depending on the
653                         endianness of the processor at build time.
654     @constant       kAudioFormatFlagsCanonical
655                         The flags for the canonical audio sample type. This matches AudioSampleType.
656     @constant       kAudioFormatFlagsAudioUnitCanonical
657                         The flags for the canonical audio unit sample type. This matches
658                         AudioUnitSampleType.
659     @constant       kAudioFormatFlagsNativeFloatPacked
660                         The flags for fully packed, native endian floating point data.
661 }
662 const
663 {$ifc TARGET_RT_BIG_ENDIAN}
664 	kAudioFormatFlagsNativeEndian = kAudioFormatFlagIsBigEndian;
665 {$elsec}
666 	kAudioFormatFlagsNativeEndian = 0;
667 {$endc}  {TARGET_RT_BIG_ENDIAN}
668 {$ifc not CA_PREFER_FIXED_POINT}
669 	kAudioFormatFlagsCanonical = kAudioFormatFlagIsFloat or kAudioFormatFlagsNativeEndian or kAudioFormatFlagIsPacked;
670 	kAudioFormatFlagsAudioUnitCanonical = kAudioFormatFlagIsFloat or kAudioFormatFlagsNativeEndian or kAudioFormatFlagIsPacked or kAudioFormatFlagIsNonInterleaved;
671 {$elsec}
672 	kAudioFormatFlagsCanonical = kAudioFormatFlagIsSignedInteger or kAudioFormatFlagsNativeEndian or kAudioFormatFlagIsPacked;
673 	kAudioFormatFlagsAudioUnitCanonical = kAudioFormatFlagIsSignedInteger or kAudioFormatFlagsNativeEndian or kAudioFormatFlagIsPacked or kAudioFormatFlagIsNonInterleaved or (kAudioUnitSampleFractionBits shl kLinearPCMFormatFlagsSampleFractionShift);
674 {$endc}
675 	kAudioFormatFlagsNativeFloatPacked = kAudioFormatFlagIsFloat or kAudioFormatFlagsNativeEndian or kAudioFormatFlagIsPacked;
676 
677 {!
678     @defined    TestAudioFormatNativeEndian
679     @abstract   A macro for checking if an ASBD indicates native endian linear PCM data.
680 }
681 // #define TestAudioFormatNativeEndian(f)  ((f.mFormatID == kAudioFormatLinearPCM) && ((f.mFormatFlags & kAudioFormatFlagIsBigEndian) == kAudioFormatFlagsNativeEndian))
682 
683 {!
684     @function   IsAudioFormatNativeEndian
685     @abstract   A C++ inline function for checking if an ASBD indicates native endian linear PCM
686                 data.
687     @param      f
688                     The AudioStreamBasicDescription to examine.
689     @result     Whether or not the ASBD indicates native endian linear PCM data.
690 }
691 
692 {!
693     @function   CalculateLPCMFlags
694     @abstract   A C++ inline function for calculating the mFormatFlags for linear PCM data. Note
695                 that this function does not support specifying sample formats that are either
696                 unsigned integer or low-aligned.
697     @param      inSampleRate
698 
699     @param      inValidBitsPerChannel
700                     The number of valid bits in each sample.
701     @param      inTotalBitsPerChannel
702                     The total number of bits in each sample.
703     @param      inIsFloat
704                     Whether or not the samples are represented with floating point numbers.
705     @param      isIsBigEndian
706                     Whether the samples are big endian or little endian.
707     @result     A UInt32 containing the format flags.
708 }
709 
710 {!
711     @function   FillOutASBDForLPCM
712     @abstract   A C++ inline function for filling out an AudioStreamBasicDescription to describe
713                 linear PCM data. Note that this function does not support specifying sample formats
714                 that are either unsigned integer or low-aligned.
715     @param      outASBD
716                     The AudioStreamBasicDescription to fill out.
717     @param      inSampleRate
718                     The number of sample frames per second of the data in the stream.
719     @param      inChannelsPerFrame
720                     The number of channels in each frame of data.
721     @param      inValidBitsPerChannel
722                     The number of valid bits in each sample.
723     @param      inTotalBitsPerChannel
724                     The total number of bits in each sample.
725     @param      inIsFloat
726                     Whether or not the samples are represented with floating point numbers.
727     @param      isIsBigEndian
728                     Whether the samples are big endian or little endian.
729 }
730 
731 
732 {!
733     @struct         AudioStreamPacketDescription
734     @abstract       This structure describes the packet layout of a buffer of data where the size of
735                     each packet may not be the same or where there is extraneous data between
736                     packets.
737     @field          mStartOffset
738                         The number of bytes from the start of the buffer to the beginning of the
739                         packet.
740     @field          mVariableFramesInPacket
741                         The number of sample frames of data in the packet. For formats with a
742                         constant number of frames per packet, this field is set to 0.
743     @field          mDataByteSize
744                         The number of bytes in the packet.
745 }
746 type
747 	AudioStreamPacketDescriptionPtr = ^AudioStreamPacketDescription;
748 	AudioStreamPacketDescriptionPtrPtr = ^AudioStreamPacketDescriptionPtr;
749 	AudioStreamPacketDescription = record
750 		mStartOffset: SInt64;
751 		mVariableFramesInPacket: UInt32;
752 		mDataByteSize: UInt32;
753 	end;
754 
755 //  SMPTETime is also defined in the CoreVideo headers.
756 //#if !defined(__SMPTETime__)
757 //#define __SMPTETime__
758 {GRP translation note:  As far as MacOSX10.4u.sdk public headers is concerned, this
759   header/interface is the only place these declarations are made. }
760 
761 {!
762     @struct         SMPTETime
763     @abstract       A structure for holding a SMPTE time.
764     @field          mSubframes
765                         The number of subframes in the full message.
766     @field          mSubframeDivisor
767                         The number of subframes per frame (typically 80).
768     @field          mCounter
769                         The total number of messages received.
770     @field          mType
771                         The kind of SMPTE time using the SMPTE time type constants.
772     @field          mFlags
773                         A set of flags that indicate the SMPTE state.
774     @field          mHours
775                         The number of hours in the full message.
776     @field          mMinutes
777                         The number of minutes in the full message.
778     @field          mSeconds
779                         The number of seconds in the full message.
780     @field          mFrames
781                         The number of frames in the full message.
782 }
783 type
784 	SMPTETime = record
785 		mSubframes: SInt16;
786 		mSubframeDivisor: SInt16;
787 		mCounter: UInt32;
788 		mType: UInt32;
789 		mFlags: UInt32;
790 		mHours: SInt16;
791 		mMinutes: SInt16;
792 		mSeconds: SInt16;
793 		mFrames: SInt16;
794 	end;
795 
796 {!
797     @enum           SMPTE Time Types
798     @abstract       Constants that describe the type of SMPTE time.
799     @constant       kSMPTETimeType24
800                         24 Frame
801     @constant       kSMPTETimeType25
802                         25 Frame
803     @constant       kSMPTETimeType30Drop
804                         30 Drop Frame
805     @constant       kSMPTETimeType30
806                         30 Frame
807     @constant       kSMPTETimeType2997
808                         29.97 Frame
809     @constant       kSMPTETimeType2997Drop
810                         29.97 Drop Frame
811     @constant       kSMPTETimeType60
812                         60 Frame
813     @constant       kSMPTETimeType5994
814                         59.94 Frame
815     @constant       kSMPTETimeType60Drop
816                         60 Drop Frame
817     @constant       kSMPTETimeType5994Drop
818                         59.94 Drop Frame
819     @constant       kSMPTETimeType50
820                         50 Frame
821     @constant       kSMPTETimeType2398
822                         23.98 Frame
823 }
824 const
825 	kSMPTETimeType24 = 0;
826 	kSMPTETimeType25 = 1;
827 	kSMPTETimeType30Drop = 2;
828 	kSMPTETimeType30 = 3;
829 	kSMPTETimeType2997 = 4;
830 	kSMPTETimeType2997Drop = 5;
831 	kSMPTETimeType60 = 6;
832 	kSMPTETimeType5994 = 7;
833 	kSMPTETimeType60Drop = 8;
834 	kSMPTETimeType5994Drop = 9;
835 	kSMPTETimeType50 = 10;
836 	kSMPTETimeType2398 = 11;
837 
838 {!
839     @enum           SMPTE State Flags
840     @abstract       Flags that describe the SMPTE time state.
841     @constant       kSMPTETimeValid
842                         The full time is valid.
843     @constant       kSMPTETimeRunning
844                         Time is running.
845 }
846 const
847 	kSMPTETimeValid = 1 shl 0;
848 	kSMPTETimeRunning = 1 shl 1;
849 
850 //#endif
851 
852 {!
853     @struct         AudioTimeStamp
854     @abstract       A structure that holds different representations of the same point in time.
855     @field          mSampleTime
856                         The absolute sample frame time.
857     @field          mHostTime
858                         The host machine's time base, mach_absolute_time.
859     @field          mRateScalar
860                         The ratio of actual host ticks per sample frame to the nominal host ticks
861                         per sample frame.
862     @field          mWordClockTime
863                         The word clock time.
864     @field          mSMPTETime
865                         The SMPTE time.
866     @field          mFlags
867                         A set of flags indicating which representations of the time are valid.
868     @field          mReserved
869                         Pads the structure out to force an even 8 byte alignment.
870 }
871 type
872 	AudioTimeStamp = record
873 		mSampleTime: Float64;
874 		mHostTime: UInt64;
875 		mRateScalar: Float64;
876 		mWordClockTime: UInt64;
877 		mSMPTETime: SMPTETime;
878 		mFlags: UInt32;
879 		mReserved: UInt32;
880 	end;
881 	AudioTimeStampPtr = ^AudioTimeStamp;
882 
883 {!
884     @enum           AudioTimeStamp Flags
885     @abstract       The flags that indicate which fields in an AudioTimeStamp structure are valid.
886     @constant       kAudioTimeStampSampleTimeValid
887                         The sample frame time is valid.
888     @constant       kAudioTimeStampHostTimeValid
889                         The host time is valid.
890     @constant       kAudioTimeStampRateScalarValid
891                         The rate scalar is valid.
892     @constant       kAudioTimeStampWordClockTimeValid
893                         The word clock time is valid.
894     @constant       kAudioTimeStampSMPTETimeValid
895                         The SMPTE time is valid.
896 }
897 const
898 	kAudioTimeStampSampleTimeValid = 1 shl 0;
899 	kAudioTimeStampHostTimeValid = 1 shl 1;
900 	kAudioTimeStampRateScalarValid = 1 shl 2;
901 	kAudioTimeStampWordClockTimeValid = 1 shl 3;
902 	kAudioTimeStampSMPTETimeValid = 1 shl 4;
903 
904 {!
905     @enum           Commonly Used Combinations of AudioTimeStamp Flags
906     @abstract       Some commonly used combinations of AudioTimeStamp flags.
907     @constant       kAudioTimeStampSampleHostTimeValid
908                         The sample frame time and the host time are valid.
909 }
910 const
911 	kAudioTimeStampSampleHostTimeValid = kAudioTimeStampSampleTimeValid or kAudioTimeStampHostTimeValid;
912 
913 {!
914     @function   FillOutAudioTimeStampWithSampleTime
915     @abstract   A C++ inline function for filling out an AudioTimeStamp with a sample time
916     @param      outATS
917                     The AudioTimeStamp to fill out.
918     @param      inSampleTime
919                     The sample time to put in the AudioTimeStamp.
920 }
921 
922 {!
923     @function   FillOutAudioTimeStampWithHostTime
924     @abstract   A C++ inline function for filling out an AudioTimeStamp with a host time
925     @param      outATS
926                     The AudioTimeStamp to fill out.
927     @param      inHostTime
928                     The host time to put in the AudioTimeStamp.
929 }
930 
931 {!
932     @function   FillOutAudioTimeStampWithSampleAndHostTime
933     @abstract   A C++ inline function for filling out an AudioTimeStamp with a sample time and a
934                 host time
935     @param      outATS
936                     The AudioTimeStamp to fill out.
937     @param      inSampleTime
938                     The sample time to put in the AudioTimeStamp.
939     @param      inHostTime
940                     The host time to put in the AudioTimeStamp.
941 }
942 
943 {!
944     @struct         AudioClassDescription
945     @abstract       This structure is used to describe codecs installed on the system.
946     @field          mType
947                         The four char code codec type.
948     @field          mSubType
949                         The four char code codec subtype.
950     @field          mManufacturer
951                         The four char code codec manufacturer.
952 }
953 type
954 	AudioClassDescription = record
955 		mType: OSType;
956 		mSubType: OSType;
957 		mManufacturer: OSType;
958 	end;
959 
960 
961 {!
962     @typedef        AudioChannelLabel
963     @abstract       A tag idenitfying how the channel is to be used.
964 }
965 type
966 	AudioChannelLabel = UInt32;
967 
968 {!
969     @typedef        AudioChannelLayoutTag
970     @abstract       A tag identifying a particular pre-defined channel layout.
971 }
972 type
973 	AudioChannelLayoutTag = UInt32;
974 
975 {!
976     @struct         AudioChannelDescription
977     @abstract       This structure describes a single channel.
978     @field          mChannelLabel
979                         The AudioChannelLabel that describes the channel.
980     @field          mChannelFlags
981                         Flags that control the interpretation of mCoordinates.
982     @field          mCoordinates
983                         An ordered triple that specifies a precise speaker location.
984 }
985 type
986 	AudioChannelDescription = record
987 		mChannelLabel: AudioChannelLabel;
988 		mChannelFlags: UInt32;
989 		mCoordinates: array[0..2] of Float32;
990 	end;
991 
992 {!
993     @struct         AudioChannelLayout
994     @abstract       This structure is used to specify channel layouts in files and hardware.
995     @field          mChannelLayoutTag
996                         The AudioChannelLayoutTag that indicates the layout.
997     @field          mChannelBitmap
998                         If mChannelLayoutTag is set to kAudioChannelLayoutTag_UseChannelBitmap, this
999                         field is the channel usage bitmap.
1000     @field          mNumberChannelDescriptions
1001                         The number of items in the mChannelDescriptions array.
1002     @field          mChannelDescriptions
1003                         A variable length array of AudioChannelDescriptions that describe the
1004                         layout.
1005 }
1006 type
1007 	AudioChannelLayoutPtr = ^AudioChannelLayout;
1008 	AudioChannelLayout = record
1009 		mChannelLayoutTag: AudioChannelLayoutTag;
1010 		mChannelBitmap: UInt32;
1011 		mNumberChannelDescriptions: UInt32;
1012 		mChannelDescriptions: array[0..0] of AudioChannelDescription;
1013 	end;
1014 
1015 {!
1016     @enum           AudioChannelLabel Constants
1017     @abstract       These constants are for use in the mChannelLabel field of an
1018                     AudioChannelDescription structure.
1019     @discussion     These channel labels attempt to list all labels in common use. Due to the
1020                     ambiguities in channel labeling by various groups, there may be some overlap or
1021                     duplication in the labels below. Use the label which most clearly describes what
1022                     you mean.
1023 
1024                     WAVE files seem to follow the USB spec for the channel flags. A channel map lets
1025                     you put these channels in any order, however a WAVE file only supports labels
1026                     1-18 and if present, they must be in the order given below. The integer values
1027                     for the labels below match the bit position of the label in the USB bitmap and
1028                     thus also the WAVE file bitmap.
1029 }
1030 const
1031 	kAudioChannelLabel_Unknown = $FFFFFFFF;   // unknown or unspecified other use
1032 	kAudioChannelLabel_Unused = 0;            // channel is present, but has no intended use or destination
1033 	kAudioChannelLabel_UseCoordinates = 100;          // channel is described by the mCoordinates fields.
1034 
1035 	kAudioChannelLabel_Left = 1;
1036 	kAudioChannelLabel_Right = 2;
1037 	kAudioChannelLabel_Center = 3;
1038 	kAudioChannelLabel_LFEScreen = 4;
1039 	kAudioChannelLabel_LeftSurround = 5;            // WAVE: "Back Left"
1040 	kAudioChannelLabel_RightSurround = 6;            // WAVE: "Back Right"
1041 	kAudioChannelLabel_LeftCenter = 7;
1042 	kAudioChannelLabel_RightCenter = 8;
1043 	kAudioChannelLabel_CenterSurround = 9;            // WAVE: "Back Center" or plain "Rear Surround"
1044 	kAudioChannelLabel_LeftSurroundDirect = 10;           // WAVE: "Side Left"
1045 	kAudioChannelLabel_RightSurroundDirect = 11;           // WAVE: "Side Right"
1046 	kAudioChannelLabel_TopCenterSurround = 12;
1047 	kAudioChannelLabel_VerticalHeightLeft = 13;           // WAVE: "Top Front Left"
1048 	kAudioChannelLabel_VerticalHeightCenter = 14;           // WAVE: "Top Front Center"
1049 	kAudioChannelLabel_VerticalHeightRight = 15;           // WAVE: "Top Front Right"
1050 
1051 	kAudioChannelLabel_TopBackLeft = 16;
1052 	kAudioChannelLabel_TopBackCenter = 17;
1053 	kAudioChannelLabel_TopBackRight = 18;
1054 	kAudioChannelLabel_RearSurroundLeft = 33;
1055 	kAudioChannelLabel_RearSurroundRight = 34;
1056 	kAudioChannelLabel_LeftWide = 35;
1057 	kAudioChannelLabel_RightWide = 36;
1058 	kAudioChannelLabel_LFE2 = 37;
1059 	kAudioChannelLabel_LeftTotal = 38;           // matrix encoded 4 channels
1060 	kAudioChannelLabel_RightTotal = 39;           // matrix encoded 4 channels
1061 	kAudioChannelLabel_HearingImpaired = 40;
1062 	kAudioChannelLabel_Narration = 41;
1063 	kAudioChannelLabel_Mono = 42;
1064 	kAudioChannelLabel_DialogCentricMix = 43;
1065 	kAudioChannelLabel_CenterSurroundDirect = 44;           // back center, non diffuse
1066 
1067 	kAudioChannelLabel_Haptic = 45;
1068 
1069     // first order ambisonic channels
1070 	kAudioChannelLabel_Ambisonic_W = 200;
1071 	kAudioChannelLabel_Ambisonic_X = 201;
1072 	kAudioChannelLabel_Ambisonic_Y = 202;
1073 	kAudioChannelLabel_Ambisonic_Z = 203;
1074 
1075     // Mid/Side Recording
1076 	kAudioChannelLabel_MS_Mid = 204;
1077 	kAudioChannelLabel_MS_Side = 205;
1078 
1079     // X-Y Recording
1080 	kAudioChannelLabel_XY_X = 206;
1081 	kAudioChannelLabel_XY_Y = 207;
1082 
1083     // other
1084 	kAudioChannelLabel_HeadphonesLeft = 301;
1085 	kAudioChannelLabel_HeadphonesRight = 302;
1086 	kAudioChannelLabel_ClickTrack = 304;
1087 	kAudioChannelLabel_ForeignLanguage = 305;
1088 
1089     // generic discrete channel
1090 	kAudioChannelLabel_Discrete = 400;
1091 
1092     // numbered discrete channel
1093 	kAudioChannelLabel_Discrete_0 = (1 shl 16) or 0;
1094 	kAudioChannelLabel_Discrete_1 = (1 shl 16) or 1;
1095 	kAudioChannelLabel_Discrete_2 = (1 shl 16) or 2;
1096 	kAudioChannelLabel_Discrete_3 = (1 shl 16) or 3;
1097 	kAudioChannelLabel_Discrete_4 = (1 shl 16) or 4;
1098 	kAudioChannelLabel_Discrete_5 = (1 shl 16) or 5;
1099 	kAudioChannelLabel_Discrete_6 = (1 shl 16) or 6;
1100 	kAudioChannelLabel_Discrete_7 = (1 shl 16) or 7;
1101 	kAudioChannelLabel_Discrete_8 = (1 shl 16) or 8;
1102 	kAudioChannelLabel_Discrete_9 = (1 shl 16) or 9;
1103 	kAudioChannelLabel_Discrete_10 = (1 shl 16) or 10;
1104 	kAudioChannelLabel_Discrete_11 = (1 shl 16) or 11;
1105 	kAudioChannelLabel_Discrete_12 = (1 shl 16) or 12;
1106 	kAudioChannelLabel_Discrete_13 = (1 shl 16) or 13;
1107 	kAudioChannelLabel_Discrete_14 = (1 shl 16) or 14;
1108 	kAudioChannelLabel_Discrete_15 = (1 shl 16) or 15;
1109 	kAudioChannelLabel_Discrete_65535 = (1 shl 16) or 65535;
1110 
1111 {!
1112     @enum           Channel Bitmap Constants
1113     @abstract       These constants are for use in the mChannelBitmap field of an
1114                     AudioChannelLayout structure.
1115 }
1116 const
1117 	kAudioChannelBit_Left = 1 shl 0;
1118 	kAudioChannelBit_Right = 1 shl 1;
1119 	kAudioChannelBit_Center = 1 shl 2;
1120 	kAudioChannelBit_LFEScreen = 1 shl 3;
1121 	kAudioChannelBit_LeftSurround = 1 shl 4;      // WAVE: "Back Left"
1122 	kAudioChannelBit_RightSurround = 1 shl 5;      // WAVE: "Back Right"
1123 	kAudioChannelBit_LeftCenter = 1 shl 6;
1124 	kAudioChannelBit_RightCenter = 1 shl 7;
1125 	kAudioChannelBit_CenterSurround = 1 shl 8;      // WAVE: "Back Center"
1126 	kAudioChannelBit_LeftSurroundDirect = 1 shl 9;      // WAVE: "Side Left"
1127 	kAudioChannelBit_RightSurroundDirect = 1 shl 10;     // WAVE: "Side Right"
1128 	kAudioChannelBit_TopCenterSurround = 1 shl 11;
1129 	kAudioChannelBit_VerticalHeightLeft = 1 shl 12;     // WAVE: "Top Front Left"
1130 	kAudioChannelBit_VerticalHeightCenter = 1 shl 13;     // WAVE: "Top Front Center"
1131 	kAudioChannelBit_VerticalHeightRight = 1 shl 14;     // WAVE: "Top Front Right"
1132 	kAudioChannelBit_TopBackLeft = 1 shl 15;
1133 	kAudioChannelBit_TopBackCenter = 1 shl 16;
1134 	kAudioChannelBit_TopBackRight = 1 shl 17;
1135 
1136 {!
1137     @enum           Channel Coordinate Flags
1138     @abstract       These constants are used in the mChannelFlags field of an
1139                     AudioChannelDescription structure.
1140     @constant       kAudioChannelFlags_RectangularCoordinates
1141                         The channel is specified by the cartesioan coordinates of the speaker
1142                         position. This flag is mutally exclusive with
1143                         kAudioChannelFlags_SphericalCoordinates.
1144     @constant       kAudioChannelFlags_SphericalCoordinates
1145                         The channel is specified by the spherical coordinates of the speaker
1146                         position. This flag is mutally exclusive with
1147                         kAudioChannelFlags_RectangularCoordinates.
1148     @constant       kAudioChannelFlags_Meters
1149                         Set to indicate the units are in meters, clear to indicate the units are
1150                         relative to the unit cube or unit sphere.
1151 }
1152 const
1153 	kAudioChannelFlags_AllOff = 0;
1154 	kAudioChannelFlags_RectangularCoordinates = 1 shl 0;
1155 	kAudioChannelFlags_SphericalCoordinates = 1 shl 1;
1156 	kAudioChannelFlags_Meters = 1 shl 2;
1157 
1158 // these are indices for acessing the mCoordinates array in struct AudioChannelDescription
1159 {!
1160     @enum           Channel Coordinate Index Constants
1161     @abstract       Constants for indexing the mCoordinates array in an AudioChannelDescription
1162                     structure.
1163     @constant       kAudioChannelCoordinates_LeftRight
1164                         For rectangulare coordinates, negative is left and positive is right.
1165     @constant       kAudioChannelCoordinates_BackFront
1166                         For rectangulare coordinates, negative is back and positive is front.
1167     @constant       kAudioChannelCoordinates_DownUp
1168                         For rectangulare coordinates, negative is below ground level, 0 is ground
1169                         level, and positive is above ground level.
1170     @constant       kAudioChannelCoordinates_Azimuth
1171                         For spherical coordinates, 0 is front center, positive is right, negative is
1172                         left. This is measured in degrees.
1173     @constant       kAudioChannelCoordinates_Elevation
1174                         For spherical coordinates, +90 is zenith, 0 is horizontal, -90 is nadir.
1175                         This is measured in degrees.
1176     @constant       kAudioChannelCoordinates_Distance
1177                         For spherical coordinates, the units are described by flags.
1178 }
1179 const
1180 	kAudioChannelCoordinates_LeftRight = 0;
1181 	kAudioChannelCoordinates_BackFront = 1;
1182 	kAudioChannelCoordinates_DownUp = 2;
1183 	kAudioChannelCoordinates_Azimuth = 0;
1184 	kAudioChannelCoordinates_Elevation = 1;
1185 	kAudioChannelCoordinates_Distance = 2;
1186 
1187 {!
1188     @function       AudioChannelLayoutTag_GetNumberOfChannels
1189     @abstract       A macro to get the number of channels out of an AudioChannelLayoutTag
1190     @discussion     The low 16 bits of an AudioChannelLayoutTag gives the number of channels except
1191                     for kAudioChannelLayoutTag_UseChannelDescriptions and
1192                     kAudioChannelLayoutTag_UseChannelBitmap.
1193     @param          layoutTag
1194                         The AudioChannelLayoutTag to examine.
1195     @result         The number of channels the tag indicates.
1196 }
1197 //#define AudioChannelLayoutTag_GetNumberOfChannels(layoutTag) ((UInt32)((layoutTag) & 0x0000FFFF))
1198 
1199 {!
1200     @enum           AudioChannelLayoutTag Constants
1201     @abstract       These constants are used in the mChannelLayoutTag field of an AudioChannelLayout
1202                     structure.
1203 }
1204 const
1205 // Some channel abbreviations used below:
1206     // L - left
1207     // R - right
1208     // C - center
1209     // Ls - left surround
1210     // Rs - right surround
1211     // Cs - center surround
1212     // Rls - rear left surround
1213     // Rrs - rear right surround
1214     // Lw - left wide
1215     // Rw - right wide
1216     // Lsd - left surround direct
1217     // Rsd - right surround direct
1218     // Lc - left center
1219     // Rc - right center
1220     // Ts - top surround
1221     // Vhl - vertical height left
1222     // Vhc - vertical height center
1223     // Vhr - vertical height right
1224     // Lt - left matrix total. for matrix encoded stereo.
1225     // Rt - right matrix total. for matrix encoded stereo.
1226 
1227     //  General layouts
1228 	kAudioChannelLayoutTag_UseChannelDescriptions = (0 shl 16) or 0;     // use the array of AudioChannelDescriptions to define the mapping.
1229 	kAudioChannelLayoutTag_UseChannelBitmap = (1 shl 16) or 0;     // use the bitmap to define the mapping.
1230 
1231 	kAudioChannelLayoutTag_Mono = (100 shl 16) or 1;   // a standard mono stream
1232 	kAudioChannelLayoutTag_Stereo = (101 shl 16) or 2;   // a standard stereo stream (L R) - implied playback
1233 	kAudioChannelLayoutTag_StereoHeadphones = (102 shl 16) or 2;   // a standard stereo stream (L R) - implied headphone playbac
1234 	kAudioChannelLayoutTag_MatrixStereo = (103 shl 16) or 2;   // a matrix encoded stereo stream (Lt, Rt)
1235 	kAudioChannelLayoutTag_MidSide = (104 shl 16) or 2;   // mid/side recording
1236 	kAudioChannelLayoutTag_XY = (105 shl 16) or 2;   // coincident mic pair (often 2 figure 8's)
1237 	kAudioChannelLayoutTag_Binaural = (106 shl 16) or 2;   // binaural stereo (left, right)
1238 	kAudioChannelLayoutTag_Ambisonic_B_Format = (107 shl 16) or 4;   // W, X, Y, Z
1239 
1240 	kAudioChannelLayoutTag_Quadraphonic = (108 shl 16) or 4;   // L R Ls Rs  -- 90 degree speaker separation
1241 	kAudioChannelLayoutTag_Pentagonal = (109 shl 16) or 5;   // L R Ls Rs C  -- 72 degree speaker separation
1242 	kAudioChannelLayoutTag_Hexagonal = (110 shl 16) or 6;   // L R Ls Rs C Cs  -- 60 degree speaker separation
1243 	kAudioChannelLayoutTag_Octagonal = (111 shl 16) or 8;   // L R Ls Rs C Cs Lw Rw  -- 45 degree speaker separation
1244 	kAudioChannelLayoutTag_Cube = (112 shl 16) or 8;   // left, right, rear left, rear right
1245                                                                         // top left, top right, top rear left, top rear right
1246 
1247     //  MPEG defined layouts
1248 	kAudioChannelLayoutTag_MPEG_1_0 = kAudioChannelLayoutTag_Mono;         //  C
1249 	kAudioChannelLayoutTag_MPEG_2_0 = kAudioChannelLayoutTag_Stereo;       //  L R
1250 	kAudioChannelLayoutTag_MPEG_3_0_A = (113 shl 16) or 3;                       //  L R C
1251 	kAudioChannelLayoutTag_MPEG_3_0_B = (114 shl 16) or 3;                       //  C L R
1252 	kAudioChannelLayoutTag_MPEG_4_0_A = (115 shl 16) or 4;                       //  L R C Cs
1253 	kAudioChannelLayoutTag_MPEG_4_0_B = (116 shl 16) or 4;                       //  C L R Cs
1254 	kAudioChannelLayoutTag_MPEG_5_0_A = (117 shl 16) or 5;                       //  L R C Ls Rs
1255 	kAudioChannelLayoutTag_MPEG_5_0_B = (118 shl 16) or 5;                       //  L R Ls Rs C
1256 	kAudioChannelLayoutTag_MPEG_5_0_C = (119 shl 16) or 5;                       //  L C R Ls Rs
1257 	kAudioChannelLayoutTag_MPEG_5_0_D = (120 shl 16) or 5;                       //  C L R Ls Rs
1258 	kAudioChannelLayoutTag_MPEG_5_1_A = (121 shl 16) or 6;                       //  L R C LFE Ls Rs
1259 	kAudioChannelLayoutTag_MPEG_5_1_B = (122 shl 16) or 6;                       //  L R Ls Rs C LFE
1260 	kAudioChannelLayoutTag_MPEG_5_1_C = (123 shl 16) or 6;                       //  L C R Ls Rs LFE
1261 	kAudioChannelLayoutTag_MPEG_5_1_D = (124 shl 16) or 6;                       //  C L R Ls Rs LFE
1262 	kAudioChannelLayoutTag_MPEG_6_1_A = (125 shl 16) or 7;                       //  L R C LFE Ls Rs Cs
1263 	kAudioChannelLayoutTag_MPEG_7_1_A = (126 shl 16) or 8;                       //  L R C LFE Ls Rs Lc Rc
1264 	kAudioChannelLayoutTag_MPEG_7_1_B = (127 shl 16) or 8;                       //  C Lc Rc L R Ls Rs LFE    (doc: IS-13818-7 MPEG2-AAC Table 3.1)
1265 	kAudioChannelLayoutTag_MPEG_7_1_C = (128 shl 16) or 8;                       //  L R C LFE Ls R Rls Rrs
1266 	kAudioChannelLayoutTag_Emagic_Default_7_1 = (129 shl 16) or 8;                       //  L R Ls Rs C LFE Lc Rc
1267 	kAudioChannelLayoutTag_SMPTE_DTV = (130 shl 16) or 8;                       //  L R C LFE Ls Rs Lt Rt
1268 																						   //      (kAudioChannelLayoutTag_ITU_5_1 plus a matrix encoded stereo mix)
1269 
1270     //  ITU defined layouts
1271 	kAudioChannelLayoutTag_ITU_1_0 = kAudioChannelLayoutTag_Mono;         //  C
1272 	kAudioChannelLayoutTag_ITU_2_0 = kAudioChannelLayoutTag_Stereo;       //  L R
1273 
1274 	kAudioChannelLayoutTag_ITU_2_1 = (131 shl 16) or 3;                       //  L R Cs
1275 	kAudioChannelLayoutTag_ITU_2_2 = (132 shl 16) or 4;                       //  L R Ls Rs
1276 	kAudioChannelLayoutTag_ITU_3_0 = kAudioChannelLayoutTag_MPEG_3_0_A;   //  L R C
1277 	kAudioChannelLayoutTag_ITU_3_1 = kAudioChannelLayoutTag_MPEG_4_0_A;   //  L R C Cs
1278 
1279 	kAudioChannelLayoutTag_ITU_3_2 = kAudioChannelLayoutTag_MPEG_5_0_A;   //  L R C Ls Rs
1280 	kAudioChannelLayoutTag_ITU_3_2_1 = kAudioChannelLayoutTag_MPEG_5_1_A;   //  L R C LFE Ls Rs
1281 	kAudioChannelLayoutTag_ITU_3_4_1 = kAudioChannelLayoutTag_MPEG_7_1_C;   //  L R C LFE Ls Rs Rls Rrs
1282 
1283     // DVD defined layouts
1284 	kAudioChannelLayoutTag_DVD_0 = kAudioChannelLayoutTag_Mono;         // C (mono)
1285 	kAudioChannelLayoutTag_DVD_1 = kAudioChannelLayoutTag_Stereo;       // L R
1286 	kAudioChannelLayoutTag_DVD_2 = kAudioChannelLayoutTag_ITU_2_1;      // L R Cs
1287 	kAudioChannelLayoutTag_DVD_3 = kAudioChannelLayoutTag_ITU_2_2;      // L R Ls Rs
1288 	kAudioChannelLayoutTag_DVD_4 = (133 shl 16) or 3;                       // L R LFE
1289 	kAudioChannelLayoutTag_DVD_5 = (134 shl 16) or 4;                       // L R LFE Cs
1290 	kAudioChannelLayoutTag_DVD_6 = (135 shl 16) or 5;                       // L R LFE Ls Rs
1291 	kAudioChannelLayoutTag_DVD_7 = kAudioChannelLayoutTag_MPEG_3_0_A;   // L R C
1292 	kAudioChannelLayoutTag_DVD_8 = kAudioChannelLayoutTag_MPEG_4_0_A;   // L R C Cs
1293 	kAudioChannelLayoutTag_DVD_9 = kAudioChannelLayoutTag_MPEG_5_0_A;   // L R C Ls Rs
1294 	kAudioChannelLayoutTag_DVD_10 = (136 shl 16) or 4;                       // L R C LFE
1295 	kAudioChannelLayoutTag_DVD_11 = (137 shl 16) or 5;                       // L R C LFE Cs
1296 	kAudioChannelLayoutTag_DVD_12 = kAudioChannelLayoutTag_MPEG_5_1_A;   // L R C LFE Ls Rs
1297     // 13 through 17 are duplicates of 8 through 12.
1298 	kAudioChannelLayoutTag_DVD_13 = kAudioChannelLayoutTag_DVD_8;        // L R C Cs
1299 	kAudioChannelLayoutTag_DVD_14 = kAudioChannelLayoutTag_DVD_9;        // L R C Ls Rs
1300 	kAudioChannelLayoutTag_DVD_15 = kAudioChannelLayoutTag_DVD_10;       // L R C LFE
1301 	kAudioChannelLayoutTag_DVD_16 = kAudioChannelLayoutTag_DVD_11;       // L R C LFE Cs
1302 	kAudioChannelLayoutTag_DVD_17 = kAudioChannelLayoutTag_DVD_12;       // L R C LFE Ls Rs
1303 	kAudioChannelLayoutTag_DVD_18 = (138 shl 16) or 5;                       // L R Ls Rs LFE
1304 	kAudioChannelLayoutTag_DVD_19 = kAudioChannelLayoutTag_MPEG_5_0_B;   // L R Ls Rs C
1305 	kAudioChannelLayoutTag_DVD_20 = kAudioChannelLayoutTag_MPEG_5_1_B;   // L R Ls Rs C LFE
1306 
1307     // These layouts are recommended for AudioUnit usage
1308         // These are the symmetrical layouts
1309 	kAudioChannelLayoutTag_AudioUnit_4 = kAudioChannelLayoutTag_Quadraphonic;
1310 	kAudioChannelLayoutTag_AudioUnit_5 = kAudioChannelLayoutTag_Pentagonal;
1311 	kAudioChannelLayoutTag_AudioUnit_6 = kAudioChannelLayoutTag_Hexagonal;
1312 	kAudioChannelLayoutTag_AudioUnit_8 = kAudioChannelLayoutTag_Octagonal;
1313         // These are the surround-based layouts
1314 	kAudioChannelLayoutTag_AudioUnit_5_0 = kAudioChannelLayoutTag_MPEG_5_0_B;   // L R Ls Rs C
1315 	kAudioChannelLayoutTag_AudioUnit_6_0 = (139 shl 16) or 6;                       // L R Ls Rs C Cs
1316 	kAudioChannelLayoutTag_AudioUnit_7_0 = (140 shl 16) or 7;                       // L R Ls Rs C Rls Rrs
1317 	kAudioChannelLayoutTag_AudioUnit_7_0_Front = (148 shl 16) or 7;                       // L R Ls Rs C Lc Rc
1318 	kAudioChannelLayoutTag_AudioUnit_5_1 = kAudioChannelLayoutTag_MPEG_5_1_A;   // L R C LFE Ls Rs
1319 	kAudioChannelLayoutTag_AudioUnit_6_1 = kAudioChannelLayoutTag_MPEG_6_1_A;   // L R C LFE Ls Rs Cs
1320 	kAudioChannelLayoutTag_AudioUnit_7_1 = kAudioChannelLayoutTag_MPEG_7_1_C;   // L R C LFE Ls Rs Rls Rrs
1321 	kAudioChannelLayoutTag_AudioUnit_7_1_Front = kAudioChannelLayoutTag_MPEG_7_1_A;   // L R C LFE Ls Rs Lc Rc
1322 
1323 	kAudioChannelLayoutTag_AAC_3_0 = kAudioChannelLayoutTag_MPEG_3_0_B;   // C L R
1324 	kAudioChannelLayoutTag_AAC_Quadraphonic = kAudioChannelLayoutTag_Quadraphonic; // L R Ls Rs
1325 	kAudioChannelLayoutTag_AAC_4_0 = kAudioChannelLayoutTag_MPEG_4_0_B;   // C L R Cs
1326 	kAudioChannelLayoutTag_AAC_5_0 = kAudioChannelLayoutTag_MPEG_5_0_D;   // C L R Ls Rs
1327 	kAudioChannelLayoutTag_AAC_5_1 = kAudioChannelLayoutTag_MPEG_5_1_D;   // C L R Ls Rs Lfe
1328 	kAudioChannelLayoutTag_AAC_6_0 = (141 shl 16) or 6;                       // C L R Ls Rs Cs
1329 	kAudioChannelLayoutTag_AAC_6_1 = (142 shl 16) or 7;                       // C L R Ls Rs Cs Lfe
1330 	kAudioChannelLayoutTag_AAC_7_0 = (143 shl 16) or 7;                       // C L R Ls Rs Rls Rrs
1331 	kAudioChannelLayoutTag_AAC_7_1 = kAudioChannelLayoutTag_MPEG_7_1_B;   // C Lc Rc L R Ls Rs Lfe
1332 	kAudioChannelLayoutTag_AAC_7_1_B = (183 shl 16) or 8;                       // C L R Ls Rs Rls Rrs LFE
1333 	kAudioChannelLayoutTag_AAC_Octagonal = (144 shl 16) or 8;                       // C L R Ls Rs Rls Rrs Cs
1334 
1335 	kAudioChannelLayoutTag_TMH_10_2_std = (145 shl 16) or 16;                      // L R C Vhc Lsd Rsd Ls Rs Vhl Vhr Lw Rw Csd Cs LFE1 LFE2
1336 	kAudioChannelLayoutTag_TMH_10_2_full = (146 shl 16) or 21;                      // TMH_10_2_std plus: Lc Rc HI VI Haptic
1337 
1338 	kAudioChannelLayoutTag_AC3_1_0_1 = (149 shl 16) or 2;                       // C LFE
1339 	kAudioChannelLayoutTag_AC3_3_0 = (150 shl 16) or 3;                       // L C R
1340 	kAudioChannelLayoutTag_AC3_3_1 = (151 shl 16) or 4;                       // L C R Cs
1341 	kAudioChannelLayoutTag_AC3_3_0_1 = (152 shl 16) or 4;                       // L C R LFE
1342 	kAudioChannelLayoutTag_AC3_2_1_1 = (153 shl 16) or 4;                       // L R Cs LFE
1343 	kAudioChannelLayoutTag_AC3_3_1_1 = (154 shl 16) or 5;                       // L C R Cs LFE
1344 
1345 	kAudioChannelLayoutTag_EAC_6_0_A = (155 shl 16) or 6;                       // L C R Ls Rs Cs
1346 	kAudioChannelLayoutTag_EAC_7_0_A = (156 shl 16) or 7;                       // L C R Ls Rs Rls Rrs
1347 
1348 	kAudioChannelLayoutTag_EAC3_6_1_A = (157 shl 16) or 7;                       // L C R Ls Rs LFE Cs
1349 	kAudioChannelLayoutTag_EAC3_6_1_B = (158 shl 16) or 7;                       // L C R Ls Rs LFE Ts
1350 	kAudioChannelLayoutTag_EAC3_6_1_C = (159 shl 16) or 7;                       // L C R Ls Rs LFE Vhc
1351 	kAudioChannelLayoutTag_EAC3_7_1_A = (160 shl 16) or 8;                       // L C R Ls Rs LFE Rls Rrs
1352 	kAudioChannelLayoutTag_EAC3_7_1_B = (161 shl 16) or 8;                       // L C R Ls Rs LFE Lc Rc
1353 	kAudioChannelLayoutTag_EAC3_7_1_C = (162 shl 16) or 8;                       // L C R Ls Rs LFE Lsd Rsd
1354 	kAudioChannelLayoutTag_EAC3_7_1_D = (163 shl 16) or 8;                       // L C R Ls Rs LFE Lw Rw
1355 	kAudioChannelLayoutTag_EAC3_7_1_E = (164 shl 16) or 8;                       // L C R Ls Rs LFE Vhl Vhr
1356 
1357 	kAudioChannelLayoutTag_EAC3_7_1_F = (165 shl 16) or 8;                        // L C R Ls Rs LFE Cs Ts
1358 	kAudioChannelLayoutTag_EAC3_7_1_G = (166 shl 16) or 8;                        // L C R Ls Rs LFE Cs Vhc
1359 	kAudioChannelLayoutTag_EAC3_7_1_H = (167 shl 16) or 8;                        // L C R Ls Rs LFE Ts Vhc
1360 
1361 	kAudioChannelLayoutTag_DTS_3_1 = (168 shl 16) or 4;                        // C L R LFE
1362 	kAudioChannelLayoutTag_DTS_4_1 = (169 shl 16) or 5;                        // C L R Cs LFE
1363 	kAudioChannelLayoutTag_DTS_6_0_A = (170 shl 16) or 6;                        // Lc Rc L R Ls Rs
1364 	kAudioChannelLayoutTag_DTS_6_0_B = (171 shl 16) or 6;                        // C L R Rls Rrs Ts
1365 	kAudioChannelLayoutTag_DTS_6_0_C = (172 shl 16) or 6;                        // C Cs L R Rls Rrs
1366 	kAudioChannelLayoutTag_DTS_6_1_A = (173 shl 16) or 7;                        // Lc Rc L R Ls Rs LFE
1367 	kAudioChannelLayoutTag_DTS_6_1_B = (174 shl 16) or 7;                        // C L R Rls Rrs Ts LFE
1368 	kAudioChannelLayoutTag_DTS_6_1_C = (175 shl 16) or 7;                        // C Cs L R Rls Rrs LFE
1369 	kAudioChannelLayoutTag_DTS_7_0 = (176 shl 16) or 7;                        // Lc C Rc L R Ls Rs
1370 	kAudioChannelLayoutTag_DTS_7_1 = (177 shl 16) or 8;                        // Lc C Rc L R Ls Rs LFE
1371 	kAudioChannelLayoutTag_DTS_8_0_A = (178 shl 16) or 8;                        // Lc Rc L R Ls Rs Rls Rrs
1372 	kAudioChannelLayoutTag_DTS_8_0_B = (179 shl 16) or 8;                        // Lc C Rc L R Ls Cs Rs
1373 	kAudioChannelLayoutTag_DTS_8_1_A = (180 shl 16) or 9;                        // Lc Rc L R Ls Rs Rls Rrs LFE
1374 	kAudioChannelLayoutTag_DTS_8_1_B = (181 shl 16) or 9;                        // Lc C Rc L R Ls Cs Rs LFE
1375 	kAudioChannelLayoutTag_DTS_6_1_D = (182 shl 16) or 7;                        // C L R Ls Rs LFE Cs
1376 
1377 	kAudioChannelLayoutTag_DiscreteInOrder = (147 shl 16) or 0;                       // needs to be ORed with the actual number of channels
1378 	kAudioChannelLayoutTag_Unknown = $FFFF0000;                           // needs to be ORed with the actual number of channels
1379 
1380 
1381 // Deprecated constants
1382 
1383 {! @enum           MPEG-4 Audio Object IDs
1384     @deprecated     in version 10.5
1385 
1386     @abstract       Constants that describe the various kinds of MPEG-4 audio data.
1387     @discussion     These constants are used in the flags field of an AudioStreamBasicDescription
1388                     that describes an MPEG-4 audio stream.
1389 }
1390 const
1391 	kMPEG4Object_AAC_Main = 1;
1392 	kMPEG4Object_AAC_LC = 2;
1393 	kMPEG4Object_AAC_SSR = 3;
1394 	kMPEG4Object_AAC_LTP = 4;
1395 	kMPEG4Object_AAC_SBR = 5;
1396 	kMPEG4Object_AAC_Scalable = 6;
1397 	kMPEG4Object_TwinVQ = 7;
1398 	kMPEG4Object_CELP = 8;
1399 	kMPEG4Object_HVXC = 9;
1400 
1401 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
1402 
1403 end.
1404 {$endc} {not MACOSALLINCLUDE}
1405