1 {==================================================================================================
2      File:       CoreAudio/AudioHardwareBase.h
3 
4      Copyright:  (c) 1985-2011 by Apple, Inc., all rights reserved.
5 
6      Bugs?:      For bug reports, consult the following page on
7                  the World Wide Web:
8 
9                      http://bugs.freepascal.org
10 
11 ==================================================================================================}
12 {  Initial Pascal Translation:  Jonas Maebe, <jonas@freepascal.org>, October 2012 }
13 {
14     Modified for use with Free Pascal
15     Version 308
16     Please report any bugs to <gpc@microbizz.nl>
17 }
18 
19 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
20 {$mode macpas}
21 {$modeswitch cblocks}
22 {$packenum 1}
23 {$macro on}
24 {$inline on}
25 {$calling mwpascal}
26 
27 unit AudioHardwareBase;
28 interface
29 {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
30 {$setc GAP_INTERFACES_VERSION := $0308}
31 
32 {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
33     {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
34 {$endc}
35 
36 {$ifc defined CPUPOWERPC and defined CPUI386}
37 	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
38 {$endc}
39 {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
40 	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
41 {$endc}
42 
43 {$ifc not defined __ppc__ and defined CPUPOWERPC32}
44 	{$setc __ppc__ := 1}
45 {$elsec}
46 	{$setc __ppc__ := 0}
47 {$endc}
48 {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
49 	{$setc __ppc64__ := 1}
50 {$elsec}
51 	{$setc __ppc64__ := 0}
52 {$endc}
53 {$ifc not defined __i386__ and defined CPUI386}
54 	{$setc __i386__ := 1}
55 {$elsec}
56 	{$setc __i386__ := 0}
57 {$endc}
58 {$ifc not defined __x86_64__ and defined CPUX86_64}
59 	{$setc __x86_64__ := 1}
60 {$elsec}
61 	{$setc __x86_64__ := 0}
62 {$endc}
63 {$ifc not defined __arm__ and defined CPUARM}
64 	{$setc __arm__ := 1}
65 {$elsec}
66 	{$setc __arm__ := 0}
67 {$endc}
68 {$ifc not defined __arm64__ and defined CPUAARCH64}
69   {$setc __arm64__ := 1}
70 {$elsec}
71   {$setc __arm64__ := 0}
72 {$endc}
73 
74 {$ifc defined cpu64}
75   {$setc __LP64__ := 1}
76 {$elsec}
77   {$setc __LP64__ := 0}
78 {$endc}
79 
80 
81 {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
82 	{$error Conflicting definitions for __ppc__ and __i386__}
83 {$endc}
84 
85 {$ifc defined __ppc__ and __ppc__}
86 	{$setc TARGET_CPU_PPC := TRUE}
87 	{$setc TARGET_CPU_PPC64 := FALSE}
88 	{$setc TARGET_CPU_X86 := FALSE}
89 	{$setc TARGET_CPU_X86_64 := FALSE}
90 	{$setc TARGET_CPU_ARM := FALSE}
91 	{$setc TARGET_CPU_ARM64 := FALSE}
92 	{$setc TARGET_OS_MAC := TRUE}
93 	{$setc TARGET_OS_IPHONE := FALSE}
94 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
95 	{$setc TARGET_OS_EMBEDDED := FALSE}
96 {$elifc defined __ppc64__ and __ppc64__}
97 	{$setc TARGET_CPU_PPC := FALSE}
98 	{$setc TARGET_CPU_PPC64 := TRUE}
99 	{$setc TARGET_CPU_X86 := FALSE}
100 	{$setc TARGET_CPU_X86_64 := FALSE}
101 	{$setc TARGET_CPU_ARM := FALSE}
102 	{$setc TARGET_CPU_ARM64 := FALSE}
103 	{$setc TARGET_OS_MAC := TRUE}
104 	{$setc TARGET_OS_IPHONE := FALSE}
105 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
106 	{$setc TARGET_OS_EMBEDDED := FALSE}
107 {$elifc defined __i386__ and __i386__}
108 	{$setc TARGET_CPU_PPC := FALSE}
109 	{$setc TARGET_CPU_PPC64 := FALSE}
110 	{$setc TARGET_CPU_X86 := TRUE}
111 	{$setc TARGET_CPU_X86_64 := FALSE}
112 	{$setc TARGET_CPU_ARM := FALSE}
113 	{$setc TARGET_CPU_ARM64 := FALSE}
114 {$ifc defined iphonesim}
115  	{$setc TARGET_OS_MAC := FALSE}
116 	{$setc TARGET_OS_IPHONE := TRUE}
117 	{$setc TARGET_IPHONE_SIMULATOR := TRUE}
118 {$elsec}
119 	{$setc TARGET_OS_MAC := TRUE}
120 	{$setc TARGET_OS_IPHONE := FALSE}
121 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
122 {$endc}
123 	{$setc TARGET_OS_EMBEDDED := FALSE}
124 {$elifc defined __x86_64__ and __x86_64__}
125 	{$setc TARGET_CPU_PPC := FALSE}
126 	{$setc TARGET_CPU_PPC64 := FALSE}
127 	{$setc TARGET_CPU_X86 := FALSE}
128 	{$setc TARGET_CPU_X86_64 := TRUE}
129 	{$setc TARGET_CPU_ARM := FALSE}
130 	{$setc TARGET_CPU_ARM64 := FALSE}
131 {$ifc defined iphonesim}
132  	{$setc TARGET_OS_MAC := FALSE}
133 	{$setc TARGET_OS_IPHONE := TRUE}
134 	{$setc TARGET_IPHONE_SIMULATOR := TRUE}
135 {$elsec}
136 	{$setc TARGET_OS_MAC := TRUE}
137 	{$setc TARGET_OS_IPHONE := FALSE}
138 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
139 {$endc}
140 	{$setc TARGET_OS_EMBEDDED := FALSE}
141 {$elifc defined __arm__ and __arm__}
142 	{$setc TARGET_CPU_PPC := FALSE}
143 	{$setc TARGET_CPU_PPC64 := FALSE}
144 	{$setc TARGET_CPU_X86 := FALSE}
145 	{$setc TARGET_CPU_X86_64 := FALSE}
146 	{$setc TARGET_CPU_ARM := TRUE}
147 	{$setc TARGET_CPU_ARM64 := FALSE}
148 	{$setc TARGET_OS_MAC := FALSE}
149 	{$setc TARGET_OS_IPHONE := TRUE}
150 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
151 	{$setc TARGET_OS_EMBEDDED := TRUE}
152 {$elifc defined __arm64__ and __arm64__}
153 	{$setc TARGET_CPU_PPC := FALSE}
154 	{$setc TARGET_CPU_PPC64 := FALSE}
155 	{$setc TARGET_CPU_X86 := FALSE}
156 	{$setc TARGET_CPU_X86_64 := FALSE}
157 	{$setc TARGET_CPU_ARM := FALSE}
158 	{$setc TARGET_CPU_ARM64 := TRUE}
159 {$ifc defined ios}
160 	{$setc TARGET_OS_MAC := FALSE}
161 	{$setc TARGET_OS_IPHONE := TRUE}
162 	{$setc TARGET_OS_EMBEDDED := TRUE}
163 {$elsec}
164 	{$setc TARGET_OS_MAC := TRUE}
165 	{$setc TARGET_OS_IPHONE := FALSE}
166 	{$setc TARGET_OS_EMBEDDED := FALSE}
167 {$endc}
168 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
169 {$elsec}
170 	{$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
171 {$endc}
172 
173 {$ifc defined __LP64__ and __LP64__ }
174   {$setc TARGET_CPU_64 := TRUE}
175 {$elsec}
176   {$setc TARGET_CPU_64 := FALSE}
177 {$endc}
178 
179 {$ifc defined FPC_BIG_ENDIAN}
180 	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
181 	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
182 {$elifc defined FPC_LITTLE_ENDIAN}
183 	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
184 	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
185 {$elsec}
186 	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
187 {$endc}
188 {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
189 {$setc CALL_NOT_IN_CARBON := FALSE}
190 {$setc OLDROUTINENAMES := FALSE}
191 {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
192 {$setc OPAQUE_UPP_TYPES := TRUE}
193 {$setc OTCARBONAPPLICATION := TRUE}
194 {$setc OTKERNEL := FALSE}
195 {$setc PM_USE_SESSION_APIS := TRUE}
196 {$setc TARGET_API_MAC_CARBON := TRUE}
197 {$setc TARGET_API_MAC_OS8 := FALSE}
198 {$setc TARGET_API_MAC_OSX := TRUE}
199 {$setc TARGET_CARBON := TRUE}
200 {$setc TARGET_CPU_68K := FALSE}
201 {$setc TARGET_CPU_MIPS := FALSE}
202 {$setc TARGET_CPU_SPARC := FALSE}
203 {$setc TARGET_OS_UNIX := FALSE}
204 {$setc TARGET_OS_WIN32 := FALSE}
205 {$setc TARGET_RT_MAC_68881 := FALSE}
206 {$setc TARGET_RT_MAC_CFM := FALSE}
207 {$setc TARGET_RT_MAC_MACHO := TRUE}
208 {$setc TYPED_FUNCTION_POINTERS := TRUE}
209 {$setc TYPE_BOOL := FALSE}
210 {$setc TYPE_EXTENDED := FALSE}
211 {$setc TYPE_LONGLONG := TRUE}
212 uses MacTypes,CoreAudioTypes;
213 {$endc} {not MACOSALLINCLUDE}
214 
215 {$ALIGN POWER}
216 
217 //==================================================================================================
218 //#pragma mark -
219 //#pragma mark Overview
220 {!
221     @header AudioHardwareBase
222 
223     This file defines the HAL's object model including the properties and their needed types and
224     constants that describe the proeprty values.
225 }
226 
227 //==================================================================================================
228 //  Includes
229 
230 
231 //==================================================================================================
232 
233 //#if PRAGMA_ENUM_ALWAYSINT
234 //    #pragma enumsalwaysint off
235 //#endif
236 
237 
238 //==================================================================================================
239 //#pragma mark -
240 //#pragma mark Basic Types
241 
242 {!
243     @typedef        AudioObjectID
244     @abstract       A UInt32 that provides a handle on a specific AudioObject.
245 }
246 type
247 	AudioObjectID = UInt32;
248 
249 {!
250     @typedef        AudioClassID
251     @abstract       AudioClassIDs are used to identify the class of an AudioObject.
252 }
253 type
254 	AudioClassID = UInt32;
255 
256 {!
257     @typedef        AudioObjectPropertySelector
258     @abstract       An AudioObjectPropertySelector is a four char code that identifies, along with
259                     the AudioObjectPropertyScope and AudioObjectPropertyElement, a specific piece of
260                     information about an AudioObject.
261     @discussion     The property selector specifies the general classification of the property such
262                     as volume, stream format, latency, etc. Note that each class has a different set
263                     of selectors. A subclass inherits it's super class's set of selectors, although
264                     it may not implement them all.
265 }
266 type
267 	AudioObjectPropertySelector = UInt32;
268 
269 {!
270     @typedef        AudioObjectPropertyScope
271     @abstract       An AudioObjectPropertyScope is a four char code that identifies, along with the
272                     AudioObjectPropertySelector and AudioObjectPropertyElement, a specific piece of
273                     information about an AudioObject.
274     @discussion     The scope specifies the section of the object in which to look for the property,
275                     such as input, output, global, etc. Note that each class has a different set of
276                     scopes. A subclass inherits it's superclass's set of scopes.
277 }
278 type
279 	AudioObjectPropertyScope = UInt32;
280 
281 {!
282     @typedef        AudioObjectPropertyElement
283     @abstract       An AudioObjectPropertyElement is an integer that identifies, along with the
284                     AudioObjectPropertySelector and AudioObjectPropertyScope, a specific piece of
285                     information about an AudioObject.
286     @discussion     The element selects one of possibly many items in the section of the object in
287                     which to look for the property. Elements are number sequentially where 0
288                     represents the master element. Elements are particular to an instance of a
289                     class, meaning that two instances can have different numbers of elements in the
290                     same scope. There is no inheritance of elements.
291 }
292 type
293 	AudioObjectPropertyElement = UInt32;
294 
295 {!
296     @struct         AudioObjectPropertyAddress
297     @abstract       An AudioObjectPropertyAddress collects the three parts that identify a specific
298                     property together in a struct for easy transmission.
299     @field          mSelector
300                         The AudioObjectPropertySelector for the property.
301     @field          mScope
302                         The AudioObjectPropertyScope for the property.
303     @field          mElement
304                         The AudioObjectPropertyElement for the property.
305 }
306 type
307 	AudioObjectPropertyAddress = record
308 		mSelector: AudioObjectPropertySelector;
309 		mScope: AudioObjectPropertyScope;
310 		mElement: AudioObjectPropertyElement;
311 	end;
312 	AudioObjectPropertyAddressPtr = ^AudioObjectPropertyAddress;
313 
314 //==================================================================================================
315 //#pragma mark Basic Constants
316 
317 {!
318     @enum           Error Constants
319     @abstract       The error constants unique to the HAL.
320     @discussion     These are the error constants that are unique to the HAL. Note that the HAL's
321                     functions can and will return other codes that are not listed here. While these
322                     constants give a general idea of what might have gone wrong during the execution
323                     of an API call, if an API call returns anything other than kAudioHardwareNoError
324                     it is to be viewed as the same failure regardless of what constant is actually
325                     returned.
326     @constant       kAudioHardwareNoError
327                         The function call completed successfully.
328     @constant       kAudioHardwareNotRunningError
329                         The function call requires that the hardware be running but it isn't.
330     @constant       kAudioHardwareUnspecifiedError
331                         The function call failed while doing something that doesn't provide any
332                         error messages.
333     @constant       kAudioHardwareUnknownPropertyError
334                         The AudioObject doesn't know about the property at the given address.
335     @constant       kAudioHardwareBadPropertySizeError
336                         An improperly sized buffer was provided when accessing the data of a
337                         property.
338     @constant       kAudioHardwareIllegalOperationError
339                         The requested operation couldn't be completed.
340     @constant       kAudioHardwareBadObjectError
341                         The AudioObjectID passed to the function doesn't map to a valid AudioObject.
342     @constant       kAudioHardwareBadDeviceError
343                         The AudioObjectID passed to the function doesn't map to a valid AudioDevice.
344     @constant       kAudioHardwareBadStreamError
345                         The AudioObjectID passed to the function doesn't map to a valid AudioStream.
346     @constant       kAudioHardwareUnsupportedOperationError
347                         The AudioObject doesn't support the requested operation.
348     @constant       kAudioDeviceUnsupportedFormatError
349                         The AudioStream doesn't support the requested format.
350     @constant       kAudioDevicePermissionsError
351                         The requested operation can't be completed because the process doesn't have
352                         permission.
353 }
354 const
355 	kAudioHardwareNoError = 0;
356 	kAudioHardwareNotRunningError = FourCharCode('stop');
357 	kAudioHardwareUnspecifiedError = FourCharCode('what');
358 	kAudioHardwareUnknownPropertyError = FourCharCode('who?');
359 	kAudioHardwareBadPropertySizeError = FourCharCode('!siz');
360 	kAudioHardwareIllegalOperationError = FourCharCode('nope');
361 	kAudioHardwareBadObjectError = FourCharCode('!obj');
362 	kAudioHardwareBadDeviceError = FourCharCode('!dev');
363 	kAudioHardwareBadStreamError = FourCharCode('!str');
364 	kAudioHardwareUnsupportedOperationError = FourCharCode('unop');
365 	kAudioDeviceUnsupportedFormatError = FourCharCode('!dat');
366 	kAudioDevicePermissionsError = FourCharCode('!hog');
367 
368 {!
369     @enum           Predefined AudioObjectID values
370     @abstract       ObjectIDs that are always the same
371     @constant       kAudioObjectUnknown
372                         This is the sentinel value. No object will have an ID whose value is 0.
373 }
374 const
375 	kAudioObjectUnknown = 0;
376 
377 {!
378     @enum           Property Address Constants
379     @abstract       The valid values for the scope in a property address.
380     @constant       kAudioObjectPropertyScopeGlobal
381                         The AudioObjectPropertyScope for properties that apply to the object as a
382                         whole. All objects have a global scope and for most it is their only scope.
383     @constant       kAudioObjectPropertyScopeInput
384                         The AudioObjectPropertyScope for properties that apply to the input side of
385                         an object.
386     @constant       kAudioObjectPropertyScopeOutput
387                         The AudioObjectPropertyScope for properties that apply to the output side of
388                         an object.
389     @constant       kAudioObjectPropertyScopePlayThrough
390                         The AudioObjectPropertyScope for properties that apply to the play through
391                         side of an object.
392     @constant       kAudioObjectPropertyElementMaster
393                         The AudioObjectPropertyElement value for properties that apply to the master
394                         element or to the entire scope.
395 }
396 const
397 	kAudioObjectPropertyScopeGlobal = FourCharCode('glob');
398 	kAudioObjectPropertyScopeInput = FourCharCode('inpt');
399 	kAudioObjectPropertyScopeOutput = FourCharCode('outp');
400 	kAudioObjectPropertyScopePlayThrough = FourCharCode('ptru');
401 	kAudioObjectPropertyElementMaster = 0;
402 
403 {!
404     @enum           Wildcard Constants
405     @abstract       Constants that are used as wildcards.
406     @discussion     Wildcards match any and all values for thier associated type. They are useful
407                     when registering to receive notificationss.
408     @constant       kAudioObjectPropertySelectorWildcard
409                         The wildcard value for AudioObjectPropertySelectors.
410     @constant       kAudioObjectPropertyScopeWildcard
411                         The wildcard value for AudioObjectPropertyScopes.
412     @constant       kAudioObjectPropertyElementWildcard
413                         The wildcard value for AudioObjectPropertyElements.
414     @constant       kAudioObjectClassIDWildcard
415                         The wildcard value for AudioClassIDs.
416 }
417 const
418 	kAudioObjectPropertySelectorWildcard = FourCharCode('****');
419 	kAudioObjectPropertyScopeWildcard = FourCharCode('****');
420 	kAudioObjectPropertyElementWildcard = $FFFFFFFF;
421 	kAudioObjectClassIDWildcard = FourCharCode('****');
422 
423 //==================================================================================================
424 //#pragma mark -
425 //#pragma mark AudioObject Constants
426 
427 {!
428     @enum           AudioObject Class Constants
429     @abstract       Various constants related to the AudioObject class.
430     @discussion     The AudioObject class is the base class for all classes.
431     @constant       kAudioObjectClassID
432                         The AudioClassID that identifies the AudioObject class.
433 }
434 const
435 	kAudioObjectClassID = FourCharCode('aobj');
436 
437 //==================================================================================================
438 //#pragma mark AudioObject Properties
439 
440 {!
441     @enum           AudioObject Property Selectors
442     @abstract       AudioObjectPropertySelector values provided by objects of the AudioObject class.
443     @discussion     The AudioObject class is the base class for all classes. As such, all classes
444                     inherit this set of properties.
445     @constant       kAudioObjectPropertyBaseClass
446                         An AudioClassID that identifies the class from which the clase of the
447                         AudioObject is derived. This value must always be one of the standard
448                         classes.
449     @constant       kAudioObjectPropertyClass
450                         An AudioClassID that identifies the class of the AudioObject.
451     @constant       kAudioObjectPropertyOwner
452                         An AudioObjectID that identifies the the AudioObject that owns the given
453                         AudioObject. Note that all AudioObjects are owned by some other AudioObject.
454                         The only exception is the AudioSystemObject, for which the value of this
455                         property is kAudioObjectUnknown.
456     @constant       kAudioObjectPropertyName
457                         A CFString that contains the human readable name of the object. The caller
458                         is responsible for releasing the returned CFObject.
459     @constant       kAudioObjectPropertyModelName
460                         A CFString that contains the human readable model name of the object. The
461                         model name differs from kAudioObjectPropertyName in that two objects of the
462                         same model will have the same value for this property but may have different
463                         values for kAudioObjectPropertyName.
464     @constant       kAudioObjectPropertyManufacturer
465                         A CFString that contains the human readable name of the manufacturer of the
466                         hardware the AudioObject is a part of. The caller is responsible for
467                         releasing the returned CFObject.
468     @constant       kAudioObjectPropertyElementName
469                         A CFString that contains a human readable name for the given element in the
470                         given scope. The caller is responsible for releasing the returned CFObject.
471     @constant       kAudioObjectPropertyElementCategoryName
472                         A CFString that contains a human readable name for the category of the given
473                         element in the given scope. The caller is responsible for releasing the
474                         returned CFObject.
475     @constant       kAudioObjectPropertyElementNumberName
476                         A CFString that contains a human readable name for the number of the given
477                         element in the given scope. The caller is responsible for releasing the
478                         returned CFObject.
479     @constant       kAudioObjectPropertyOwnedObjects
480                         An array of AudioObjectIDs that represent all the AudioObjects owned by the
481                         given object. The qualifier is an array of AudioClassIDs. If it is
482                         non-empty, the returned array of AudioObjectIDs will only refer to objects
483                         whose class is in the qualifier array or whose is a subclass of one in the
484                         qualifier array.
485 }
486 const
487 	kAudioObjectPropertyBaseClass = FourCharCode('bcls');
488 	kAudioObjectPropertyClass = FourCharCode('clas');
489 	kAudioObjectPropertyOwner = FourCharCode('stdv');
490 	kAudioObjectPropertyName = FourCharCode('lnam');
491 	kAudioObjectPropertyModelName = FourCharCode('lmod');
492 	kAudioObjectPropertyManufacturer = FourCharCode('lmak');
493 	kAudioObjectPropertyElementName = FourCharCode('lchn');
494 	kAudioObjectPropertyElementCategoryName = FourCharCode('lccn');
495 	kAudioObjectPropertyElementNumberName = FourCharCode('lcnn');
496 	kAudioObjectPropertyOwnedObjects = FourCharCode('ownd');
497 
498 //==================================================================================================
499 //#pragma mark -
500 //#pragma mark AudioPlugIn Constants
501 
502 {!
503     @enum           AudioPlugIn Class Constants
504     @abstract       Various constants related to the AudioPlugIn class.
505     @constant       kAudioPlugInClassID
506                         The AudioClassID that identifies the AudioPlugIn class.
507 }
508 const
509 	kAudioPlugInClassID = FourCharCode('aplg');
510 
511 //==================================================================================================
512 //#pragma mark AudioPlugIn Properties
513 
514 {!
515     @enum           AudioPlugIn Properties
516     @abstract       AudioObjectPropertySelector values provided by the AudioPlugIn class.
517     @discussion     The AudioPlugIn class is a subclass of the AudioObject class. The class has just
518                     the global scope, kAudioObjectPropertyScopeGlobal, and only a master element.
519     @constant       kAudioPlugInPropertyBundleID
520                         A CFString that contains the bundle identifier for the AudioPlugIn. The
521                         caller is responsible for releasing the returned CFObject.
522     @constant       kAudioPlugInPropertyDeviceList
523                         An array of AudioObjectIDs that represent all the AudioDevices currently
524                         provided by the plug-in.
525     @constant       kAudioPlugInPropertyTranslateUIDToDevice
526                         This property fetches the AudioObjectID that corresponds to the AudioDevice
527                         that has the given UID. The UID is passed in via the qualifier as a CFString
528                         while the AudioObjectID for the AudioDevice is returned to the caller as the
529                         property's data. Note that an error is not returned if the UID doesn't refer
530                         to any AudioDevices. Rather, this property will return kAudioObjectUnknown
531                         as the value of the property.
532 }
533 const
534 	kAudioPlugInPropertyBundleID = FourCharCode('piid');
535 	kAudioPlugInPropertyDeviceList = FourCharCode('dev#');
536 	kAudioPlugInPropertyTranslateUIDToDevice = FourCharCode('uidd');
537 
538 //==================================================================================================
539 //#pragma mark -
540 //#pragma mark AudioTransportManager Constants
541 
542 {!
543     @enum           AudioTransportManager Class Constants
544     @abstract       Various constants related to the AudioTransportManager class.
545     @discussion     The AudioTransportManager class is a subclass of the AudioPlugIn class.
546                     Instances manage an entire tranport mechanism such as AirPlay or an AVB network
547                     of devices. AudioTransportManagers present a list of AudioEndPoints that
548                     represent all the devices that they manage. They can combine AudioEndPoints into
549                     an AudioEndPointDevice that can be used by the system the same as any other
550                     AudioDevice.
551     @constant       kAudioTransportManagerClassID
552                         The AudioClassID that identifies the AudioTransportManager class.
553 }
554 const
555 	kAudioTransportManagerClassID = FourCharCode('trpm');
556 
557 //==================================================================================================
558 //#pragma mark AudioTransportManager Properties
559 
560 {!
561     @enum           AudioTransportManager Properties
562     @abstract       AudioObjectPropertySelector values provided by the AudioTransportManager class.
563     @discussion     The AudioTransportManager class is a subclass of the AudioPlugIn class. The
564                     class has just the global scope, kAudioObjectPropertyScopeGlobal, and only a
565                     master element.
566     @constant       kAudioTransportManagerPropertyEndPointList
567                         An array of AudioObjectIDs for all the AudioEndPoint objects the transport
568                         manager is tracking.
569     @constant       kAudioTransportManagerPropertyTranslateUIDToEndPoint
570                         This property fetches the AudioObjectID that corresponds to the
571                         AudioEndpoint that has the given UID. The UID is passed in via the qualifier
572                         as a CFString while the AudioObjectID for the AudioEndpoint is returned to
573                         the caller as the property's data. Note that an error is not returned if the
574                         UID doesn't refer to any AudioEndpoints. Rather, this property will return
575                         kAudioObjectUnknown as the value of the property.
576     @constant       kAudioTransportManagerPorpertyTransportType
577                         A UInt32 whose value indicates how the transport manager's endpoints and
578 						endpoint devices are connected to the CPU. Constants for some of the values
579 						for this property can be found in the enum in the AudioDevice Constants
580 						section of this file.
581 }
582 const
583 	kAudioTransportManagerPropertyEndPointList = FourCharCode('end#');
584 	kAudioTransportManagerPropertyTranslateUIDToEndPoint = FourCharCode('uide');
585 	kAudioTransportManagerPropertyTransportType = FourCharCode('tran');
586 
587 //==================================================================================================
588 //#pragma mark -
589 //#pragma mark AudioDevice Constants
590 
591 {!
592     @enum           AudioDevice Class Constants
593     @abstract       Various constants related to the AudioDevice class.
594     @constant       kAudioDeviceClassID
595                         The AudioClassID that identifies the AudioDevice class.
596 }
597 const
598 	kAudioDeviceClassID = FourCharCode('adev');
599 
600 {!
601     @enum           Transport Type IDs
602     @abstract       Commonly used values for kAudioDevicePropertyTransportType and
603 					kAudioTransportManagerPropertyTransportType
604     @constant       kAudioDeviceTransportTypeUnknown
605                         The transport type ID returned when a device doesn't provide a transport
606                         type.
607     @constant       kAudioDeviceTransportTypeBuiltIn
608                         The transport type ID for AudioDevices built into the system.
609     @constant       kAudioDeviceTransportTypeAggregate
610                         The transport type ID for aggregate devices.
611     @constant       kAudioDeviceTransportTypeAutoAggregate
612                         The transport type ID for automatically generated aggregate devices.
613     @constant       kAudioDeviceTransportTypeVirtual
614                         The transport type ID for AudioDevices that don't correspond to real audio
615                         hardware.
616     @constant       kAudioDeviceTransportTypePCI
617                         The transport type ID for AudioDevices connected via the PCI bus.
618     @constant       kAudioDeviceTransportTypeUSB
619                         The transport type ID for AudioDevices connected via USB.
620     @constant       kAudioDeviceTransportTypeFireWire
621                         The transport type ID for AudioDevices connected via FireWire.
622     @constant       kAudioDeviceTransportTypeBluetooth
623                         The transport type ID for AudioDevices connected via Bluetooth.
624     @constant       kAudioDeviceTransportTypeHDMI
625                         The transport type ID for AudioDevices connected via HDMI.
626     @constant       kAudioDeviceTransportTypeDisplayPort
627                         The transport type ID for AudioDevices connected via DisplayPort.
628     @constant       kAudioDeviceTransportTypeAirPlay
629                         The transport type ID for AudioDevices connected via AirPlay.
630     @constant       kAudioDeviceTransportTypeAVB
631                         The transport type ID for AudioDevices connected via AVB.
632     @constant       kAudioDeviceTransportTypeThunderbolt
633                         The transport type ID for AudioDevices connected via Thunderbolt.
634 }
635 const
636 	kAudioDeviceTransportTypeUnknown = 0;
637 	kAudioDeviceTransportTypeBuiltIn = FourCharCode('bltn');
638 	kAudioDeviceTransportTypeAggregate = FourCharCode('grup');
639 	kAudioDeviceTransportTypeAutoAggregate = FourCharCode('fgrp');
640 	kAudioDeviceTransportTypeVirtual = FourCharCode('virt');
641 	kAudioDeviceTransportTypePCI = FourCharCode('pci ');
642 	kAudioDeviceTransportTypeUSB = FourCharCode('usb ');
643 	kAudioDeviceTransportTypeFireWire = FourCharCode('1394');
644 	kAudioDeviceTransportTypeBluetooth = FourCharCode('blue');
645 	kAudioDeviceTransportTypeHDMI = FourCharCode('hdmi');
646 	kAudioDeviceTransportTypeDisplayPort = FourCharCode('dprt');
647 	kAudioDeviceTransportTypeAirPlay = FourCharCode('airp');
648 	kAudioDeviceTransportTypeAVB = FourCharCode('eavb');
649 	kAudioDeviceTransportTypeThunderbolt = FourCharCode('thun');
650 
651 //==================================================================================================
652 //#pragma mark AudioDevice Properties
653 
654 {!
655     @enum           AudioDevice Properties
656     @abstract       AudioObjectPropertySelector values provided by the AudioDevice class.
657     @discussion     The AudioDevice class is a subclass of the AudioObjectClass. The class has four
658                     scopes, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyScopeInput,
659                     kAudioObjectPropertyScopeOutput, and kAudioObjectPropertyScopePlayThrough. The
660                     class has a master element and an element for each channel in each stream
661                     numbered according to the starting channel number of each stream.
662     @constant       kAudioDevicePropertyConfigurationApplication
663                         A CFString that contains the bundle ID for an application that provides a
664                         GUI for configuring the AudioDevice. By default, the value of this property
665                         is the bundle ID for Audio MIDI Setup. The caller is responsible for
666                         releasing the returned CFObject.
667     @constant       kAudioDevicePropertyDeviceUID
668                         A CFString that contains a persistent identifier for the AudioDevice. An
669                         AudioDevice's UID is persistent across boots. The content of the UID string
670                         is a black box and may contain information that is unique to a particular
671                         instance of an AudioDevice's hardware or unique to the CPU. Therefore they
672                         are not suitable for passing between CPUs or for identifying similar models
673                         of hardware. The caller is responsible for releasing the returned CFObject.
674     @constant       kAudioDevicePropertyModelUID
675                         A CFString that contains a persistent identifier for the model of an
676                         AudioDevice. The identifier is unique such that the identifier from two
677                         AudioDevices are equal if and only if the two AudioDevices are the exact
678                         same model from the same manufacturer. Further, the identifier has to be the
679                         same no matter on what machine the AudioDevice appears. The caller is
680                         responsible for releasing the returned CFObject.
681     @constant       kAudioDevicePropertyTransportType
682                         A UInt32 whose value indicates how the AudioDevice is connected to the CPU.
683                         Constants for some of the values for this property can be found in the enum
684                         in the AudioDevice Constants section of this file.
685     @constant       kAudioDevicePropertyRelatedDevices
686                         An array of AudioDeviceIDs for devices related to the AudioDevice. For
687                         IOAudio-based devices, a AudioDevices are related if they share the same
688                         IOAudioDevice object.
689     @constant       kAudioDevicePropertyClockDomain
690                         A UInt32 whose value indicates the clock domain to which this AudioDevice
691                         belongs. AudioDevices that have the same value for this property are able to
692                         be synchronized in hardware. However, a value of 0 indicates that the clock
693                         domain for the device is unspecified and should be assumed to be separate
694                         from every other device's clock domain, even if they have the value of 0 as
695                         their clock domain as well.
696     @constant       kAudioDevicePropertyDeviceIsAlive
697                         A UInt32 where a value of 1 means the device is ready and available and 0
698                         means the device is usable and will most likely go away shortly.
699     @constant       kAudioDevicePropertyDeviceIsRunning
700                         A UInt32 where a value of 0 means the AudioDevice is not performing IO and
701                         a value of 1 means that it is. Note that the device can be running even if
702                         there are no active IOProcs such as by calling AudioDeviceStart() and
703                         passing a NULL IOProc. Note that the notification for this property is
704                         usually sent from the AudioDevice's IO thread.
705     @constant       kAudioDevicePropertyDeviceCanBeDefaultDevice
706                         A UInt32 where 1 means that the AudioDevice is a possible selection for
707                         kAudioHardwarePropertyDefaultInputDevice or
708                         kAudioHardwarePropertyDefaultOutputDevice depending on the scope.
709     @constant       kAudioDevicePropertyDeviceCanBeDefaultSystemDevice
710                         A UInt32 where 1 means that the AudioDevice is a possible selection for
711                         kAudioHardwarePropertyDefaultSystemOutputDevice.
712     @constant       kAudioDevicePropertyLatency
713                         A UInt32 containing the number of frames of latency in the AudioDevice. Note
714                         that input and output latency may differ. Further, the AudioDevice's
715                         AudioStreams may have additional latency so they should be queried as well.
716                         If both the device and the stream say they have latency, then the total
717                         latency for the stream is the device latency summed with the stream latency.
718     @constant       kAudioDevicePropertyStreams
719                         An array of AudioStreamIDs that represent the AudioStreams of the
720                         AudioDevice. Note that if a notification is received for this property, any
721                         cached AudioStreamIDs for the device become invalid and need to be
722                         re-fetched.
723     @constant       kAudioObjectPropertyControlList
724                         An array of AudioObjectIDs that represent the AudioControls of the
725                         AudioDevice. Note that if a notification is received for this property, any
726                         cached AudioObjectIDs for the device become invalid and need to be
727                         re-fetched.
728     @constant       kAudioDevicePropertySafetyOffset
729                         A UInt32 whose value indicates the number for frames in ahead (for output)
730                         or behind (for input the current hardware position that is safe to do IO.
731     @constant       kAudioDevicePropertyNominalSampleRate
732                         A Float64 that indicates the current nominal sample rate of the AudioDevice.
733     @constant       kAudioDevicePropertyAvailableNominalSampleRates
734                         An array of AudioValueRange structs that indicates the valid ranges for the
735                         nominal sample rate of the AudioDevice.
736     @constant       kAudioDevicePropertyIcon
737                         A CFURLRef that indicates an image file that can be used to represent the
738                         device visually. The caller is responsible for releasing the returned
739                         CFObject.
740     @constant       kAudioDevicePropertyIsHidden
741                         A UInt32 where a non-zero value indicates that the device is not included
742                         in the normal list of devices provided by kAudioHardwarePropertyDevices nor
743                         can it be the default device. Hidden devices can only be discovered by
744                         knowing their UID and using kAudioHardwarePropertyDeviceForUID.
745     @constant       kAudioDevicePropertyPreferredChannelsForStereo
746                         An array of two UInt32s, the first for the left channel, the second for the
747                         right channel, that indicate the channel numbers to use for stereo IO on the
748                         device. The value of this property can be different for input and output and
749                         there are no restrictions on the channel numbers that can be used.
750     @constant       kAudioDevicePropertyPreferredChannelLayout
751                         An AudioChannelLayout that indicates how each channel of the AudioDevice
752                         should be used.
753 }
754 const
755 	kAudioDevicePropertyConfigurationApplication = FourCharCode('capp');
756 	kAudioDevicePropertyDeviceUID = FourCharCode('uid ');
757 	kAudioDevicePropertyModelUID = FourCharCode('muid');
758 	kAudioDevicePropertyTransportType = FourCharCode('tran');
759 	kAudioDevicePropertyRelatedDevices = FourCharCode('akin');
760 	kAudioDevicePropertyClockDomain = FourCharCode('clkd');
761 	kAudioDevicePropertyDeviceIsAlive = FourCharCode('livn');
762 	kAudioDevicePropertyDeviceIsRunning = FourCharCode('goin');
763 	kAudioDevicePropertyDeviceCanBeDefaultDevice = FourCharCode('dflt');
764 	kAudioDevicePropertyDeviceCanBeDefaultSystemDevice = FourCharCode('sflt');
765 	kAudioDevicePropertyLatency = FourCharCode('ltnc');
766 	kAudioDevicePropertyStreams = FourCharCode('stm#');
767 	kAudioObjectPropertyControlList = FourCharCode('ctrl');
768 	kAudioDevicePropertySafetyOffset = FourCharCode('saft');
769 	kAudioDevicePropertyNominalSampleRate = FourCharCode('nsrt');
770 	kAudioDevicePropertyAvailableNominalSampleRates = FourCharCode('nsr#');
771 	kAudioDevicePropertyIcon = FourCharCode('icon');
772 	kAudioDevicePropertyIsHidden = FourCharCode('hidn');
773 	kAudioDevicePropertyPreferredChannelsForStereo = FourCharCode('dch2');
774 	kAudioDevicePropertyPreferredChannelLayout = FourCharCode('srnd');
775 
776 //==================================================================================================
777 //#pragma mark -
778 //#pragma mark AudioEndPointDevice Constants
779 
780 {!
781     @enum           AudioEndPointDevice Class Constants
782     @abstract       Various constants related to the AudioEndPointDevice class.
783     @constant       kAudioEndPointDeviceClassID
784                         The AudioClassID that identifies the AudioEndPointDevice class.
785 }
786 const
787 	kAudioEndPointDeviceClassID = FourCharCode('edev');
788 
789 {!
790     @defined        kAudioEndPointDeviceUIDKey
791     @discussion     The key used in a CFDictionary that describes the composition of an
792                     AudioEndPointDevice. The value for this key is a CFString that contains the UID
793                     of the AudioEndPointDevice.
794 }
795 const
796 	kAudioEndPointDeviceUIDKey = 'uid';
797 
798 {!
799     @defined        kAudioEndPointDeviceNameKey
800     @discussion     The key used in a CFDictionary that describes the composition of an
801                     AudioEndPointDevice. The value for this key is a CFString that contains the
802                     human readable name of the AudioEndPointDevice.
803 }
804 const
805 	kAudioEndPointDeviceNameKey = 'name';
806 
807 {!
808     @defined        kAudioEndPointDeviceEndPointListKey
809     @discussion     The key used in a CFDictionary that describes the composition of an
810                     AudioEndPointDevice. The value for this key is a CFArray of CFDictionaries that
811                     describe each AudioEndPoint in the AudioEndPointDevice. The keys for this
812                     CFDictionary are defined in the AudioEndPoint Constants section.
813 }
814 const
815 	kAudioEndPointDeviceEndPointListKey = 'endpoints';
816 
817 {!
818     @defined        kAudioEndPointDeviceMasterEndPointKey
819     @discussion     The key used in a CFDictionary that describes the composition of an
820                     AudioEndPointDevice. The value for this key is a CFString that contains the UID
821                     for the AudioEndPoint that is the master time source for the
822                     AudioEndPointDevice.
823 }
824 const
825 	kAudioEndPointDeviceMasterEndPointKey = 'master';
826 
827 {!
828     @defined        kAudioEndPointDeviceIsPrivateKey
829     @discussion     The key used in a CFDictionary that describes the composition of an
830                     AudioEndPointDevice. The value for this key is a CFNumber where a value of 0
831                     means that the AudioEndPointDevice is to be published to the entire system and a
832                     value of 1 means that the AudioEndPointDevice is private to the process that
833                     created it. Note that a private AudioEndPointDevice is not persistent across
834                     launches of the process that created it. Note that if this key is not present,
835                     it implies that the AudioEndPointDevice is published to the entire system.
836 }
837 const
838 	kAudioEndPointDeviceIsPrivateKey = 'private';
839 
840 //==================================================================================================
841 //#pragma mark AudioEndPointDevice Properties
842 
843 {!
844     @enum           AudioEndPointDevice Properties
845     @abstract       AudioObjectPropertySelector values provided by the AudioEndPointDevice class.
846     @discussion     AudioEndPointDevice is a subclass of AudioDevice and has the same scope and
847                     element structure.
848     @constant       kAudioEndPointDevicePropertyComposition
849                         A CFDictionary that describes the composition of the AudioEndPointDevice.
850                         The keys for this CFDicitionary are defined in the AudioEndPointDevice
851                         Constants section. The caller is responsible for releasing the returned
852                         CFObject.
853     @constant       kAudioEndPointDevicePropertyEndPointList
854                         An array of AudioObjectIDs for all the AudioEndPoints in the device.
855     @constant       kAudioEndPointDevicePropertyIsPrivate
856                         A pid_t where a value of 0 idicates that the device is public and a non-zero
857                         value indicates the pid of the process that owns the device.
858 }
859 const
860 	kAudioEndPointDevicePropertyComposition = FourCharCode('acom');
861 	kAudioEndPointDevicePropertyEndPointList = FourCharCode('agrp');
862 	kAudioEndPointDevicePropertyIsPrivate = FourCharCode('priv');
863 
864 //==================================================================================================
865 //#pragma mark -
866 //#pragma mark AudioEndPoint Constants
867 
868 {!
869     @enum           AudioEndPoint Class Constants
870     @abstract       Various constants related to the AudioEndPoint class.
871     @discussion     The AudioEndPoint class is a subclass of AudioDevice class and has the same
872                     scope and element structure. However, AudioEndPoint objects do not implement an
873                     IO path of their own and as such do not implmenent any  AudioDevice properties
874                     associated with the IO path.
875     @constant       kAudioEndPointDeviceClassID
876                         The AudioClassID that identifies the AudioEndPointDevice class.
877 }
878 const
879 	kAudioEndPointClassID = FourCharCode('endp');
880 
881 {!
882     @defined        kAudioEndPointUIDKey
883     @discussion     The key used in a CFDictionary that describes the state of an AudioEndPoint in a
884                     description dictionary for an AudioEndPointDevice. The value for this key is a
885                     CFString that contains the UID for the AudioEndPoint.
886 }
887 const
888 	kAudioEndPointUIDKey = 'uid';
889 
890 {!
891     @defined        kAudioEndPointNameKey
892     @discussion     The key used in a CFDictionary that describes the state of an AudioEndPoint in a
893                     description dictionary for an AudioEndPointDevice. The value for this key is a
894                     CFString that contains the human readable name of the AudioEndPoint.
895 }
896 const
897 	kAudioEndPointNameKey = 'name';
898 
899 {!
900     @defined        kAudioEndPointInputChannelsKey
901     @discussion     The key used in a CFDictionary that describes the state of an AudioEndPoint in a
902                     description dictionary for an AudioEndPointDevice. The value for this key is a
903                     CFNumber that indicates the total number of input channels for the
904                     AudioEndPoint.
905 }
906 const
907 	kAudioEndPointInputChannelsKey = 'channels-in';
908 
909 {!
910     @defined        kAudioEndPointOutputChannelsKey
911     @discussion     The key used in a CFDictionary that describes the state of an AudioEndPoint in a
912                     description dictionary for an AudioEndPointDevice. The value for this key is a
913                     CFNumber that indicates the total number of output channels for the
914                     AudioEndPoint.
915 }
916 const
917 	kAudioEndPointOutputChannelsKey = 'channels-out';
918 
919 //==================================================================================================
920 //#pragma mark -
921 //#pragma mark AudioStream Types
922 
923 {!
924     @struct         AudioStreamRangedDescription
925     @abstract       This structure allows a specific sample rate range to be associated with an
926                     AudioStreamBasicDescription that specifies it's sample rate as
927                     kAudioStreamAnyRate.
928     @discussion     Note that this structure is only used to desicribe the the available formats
929                     for a stream. It is not used for the current format.
930     @field          mFormat
931                         The AudioStreamBasicDescription that describes the format of the stream.
932                         Note that the mSampleRate field of the structure will be the same as the
933                         the values in mSampleRateRange when only a single sample rate is supported.
934                         It will be kAudioStreamAnyRate when there is a range with more elements.
935     @field          mSampleRateRange
936                         The AudioValueRange that describes the minimum and maximum sample rate for
937                         the stream. If the mSampleRate field of mFormat is kAudioStreamAnyRate the
938                         format supports the range of sample rates described by this structure.
939                         Otherwise, the minimum will be the same as the maximum which will be the
940                         same as the mSampleRate field of mFormat.
941 }
942 type
943 	AudioStreamRangedDescription = record
944 		mFormat: AudioStreamBasicDescription;
945 		mSampleRateRange: AudioValueRange;
946 	end;
947 
948 //==================================================================================================
949 //#pragma mark AudioStream Constants
950 
951 {!
952     @enum           AudioStream Class Constants
953     @abstract       Various constants related to the AudioStream class.
954     @constant       kAudioStreamClassID
955                         The AudioClassID that identifies the AudioStream class.
956 }
957 const
958 	kAudioStreamClassID = FourCharCode('astr');
959 
960 {!
961     @enum           AudioStream Terminal Types
962     @abstract       Various constants that describe the terminal type of an AudioStream.
963     @constant       kAudioStreamTerminalTypeUnknown
964                         The ID used when the terminal type for the AudioStream is non known.
965     @constant       kAudioStreamTerminalTypeLine
966                         The ID for a terminal type of a line level stream. Note that this applies to
967                         both input streams and output streams
968     @constant       kAudioStreamTerminalTypeDigitalAudioInterface
969                         The ID for a terminal type of stream from/to a digital audio interface as
970                         defined by ISO 60958 (aka SPDIF or AES/EBU). Note that this applies to both
971                         input streams and output streams
972     @constant       kAudioStreamTerminalTypeSpeaker
973                         The ID for a terminal type of a speaker.
974     @constant       kAudioStreamTerminalTypeHeadphones
975                         The ID for a terminal type of headphones.
976     @constant       kAudioStreamTerminalTypeLFESpeaker
977                         The ID for a terminal type of a speaker for low frequency effects.
978     @constant       kAudioStreamTerminalTypeReceiverSpeaker
979                         The ID for a terminal type of a speaker on a telephone handset receiver.
980     @constant       kAudioStreamTerminalTypeMicrophone
981                         The ID for a terminal type of a microphone.
982     @constant       kAudioStreamTerminalTypeHeadsetMicrophone
983                         The ID for a terminal type of a microphone attached to an headset.
984     @constant       kAudioStreamTerminalTypeReceiverMicrophone
985                         The ID for a terminal type of a microhpone on a telephone handset recevier.
986     @constant       kAudioStreamTerminalTypeTTY
987                         The ID for a terminal type of a device providing a TTY signal.
988     @constant       kAudioStreamTerminalTypeHDMI
989                         The ID for a terminal type of a stream from/to an HDMI port.
990     @constant       kAudioStreamTerminalTypeDisplayPort
991                         The ID for a terminal type of a stream from/to an DisplayPort port.
992 }
993 const
994 	kAudioStreamTerminalTypeUnknown = 0;
995 	kAudioStreamTerminalTypeLine = FourCharCode('line');
996 	kAudioStreamTerminalTypeDigitalAudioInterface = FourCharCode('spdf');
997 	kAudioStreamTerminalTypeSpeaker = FourCharCode('spkr');
998 	kAudioStreamTerminalTypeHeadphones = FourCharCode('hdph');
999 	kAudioStreamTerminalTypeLFESpeaker = FourCharCode('lfes');
1000 	kAudioStreamTerminalTypeReceiverSpeaker = FourCharCode('rspk');
1001 	kAudioStreamTerminalTypeMicrophone = FourCharCode('micr');
1002 	kAudioStreamTerminalTypeHeadsetMicrophone = FourCharCode('hmic');
1003 	kAudioStreamTerminalTypeReceiverMicrophone = FourCharCode('rmic');
1004 	kAudioStreamTerminalTypeTTY = FourCharCode('tty_');
1005 	kAudioStreamTerminalTypeHDMI = FourCharCode('hdmi');
1006 	kAudioStreamTerminalTypeDisplayPort = FourCharCode('dprt');
1007 
1008 //==================================================================================================
1009 //#pragma mark AudioStream Properties
1010 
1011 {!
1012     @enum           AudioStream Properties
1013     @abstract       AudioObjectPropertySelector values provided by the AudioStream class.
1014     @discussion     AudioStream is a subclass of AudioObject and has only the single scope,
1015                     kAudioObjectPropertyScopeGlobal. They have a master element and an element for
1016                     each channel in the stream numbered upward from 1.
1017     @constant       kAudioStreamPropertyIsActive
1018                         A UInt32 where a non-zero value indicates that the stream is enabled and
1019                         doing IO.
1020     @constant       kAudioStreamPropertyDirection
1021                         A UInt32 where a value of 0 means that this AudioStream is an output stream
1022                         and a value of 1 means that it is an input stream.
1023     @constant       kAudioStreamPropertyTerminalType
1024                         A UInt32 whose value describes the general kind of functionality attached
1025                         to the AudioStream.
1026     @constant       kAudioStreamPropertyStartingChannel
1027                         A UInt32 that specifies the first element in the owning device that
1028                         corresponds to element one of this stream.
1029     @constant       kAudioStreamPropertyLatency
1030                         A UInt32 containing the number of frames of latency in the AudioStream. Note
1031                         that the owning AudioDevice may have additional latency so it should be
1032                         queried as well. If both the device and the stream say they have latency,
1033                         then the total latency for the stream is the device latency summed with the
1034                         stream latency.
1035     @constant       kAudioStreamPropertyVirtualFormat
1036                         An AudioStreamBasicDescription that describes the current data format for
1037                         the AudioStream. The virtual format refers to the data format in which all
1038                         IOProcs for the owning AudioDevice will perform IO transactions.
1039     @constant       kAudioStreamPropertyAvailableVirtualFormats
1040                         An array of AudioStreamRangedDescriptions that describe the available data
1041                         formats for the AudioStream. The virtual format refers to the data format in
1042                         which all IOProcs for the owning AudioDevice will perform IO transactions.
1043     @constant       kAudioStreamPropertyPhysicalFormat
1044                         An AudioStreamBasicDescription that describes the current data format for
1045                         the AudioStream. The physical format refers to the data format in which the
1046                         hardware for the owning AudioDevice performs it's IO transactions.
1047     @constant       kAudioStreamPropertyAvailablePhysicalFormats
1048                         An array of AudioStreamRangedDescriptions that describe the available data
1049                         formats for the AudioStream. The physical format refers to the data format
1050                         in which the hardware for the owning AudioDevice performs it's IO
1051                         transactions.
1052 }
1053 const
1054 	kAudioStreamPropertyIsActive = FourCharCode('sact');
1055 	kAudioStreamPropertyDirection = FourCharCode('sdir');
1056 	kAudioStreamPropertyTerminalType = FourCharCode('term');
1057 	kAudioStreamPropertyStartingChannel = FourCharCode('schn');
1058 	kAudioStreamPropertyLatency = kAudioDevicePropertyLatency;
1059 	kAudioStreamPropertyVirtualFormat = FourCharCode('sfmt');
1060 	kAudioStreamPropertyAvailableVirtualFormats = FourCharCode('sfma');
1061 	kAudioStreamPropertyPhysicalFormat = FourCharCode('pft ');
1062 	kAudioStreamPropertyAvailablePhysicalFormats = FourCharCode('pfta');
1063 //==================================================================================================
1064 //#pragma mark -
1065 //#pragma mark AudioControl Constants
1066 
1067 {!
1068     @enum           AudioControl Class Constants
1069     @abstract       Various constants related to the AudioControl class.
1070     @constant       kAudioControlClassID
1071                         The AudioClassID that identifies the AudioControl class.
1072 }
1073 const
1074 	kAudioControlClassID = FourCharCode('actl');
1075 
1076 {!
1077     @enum           AudioControl Property Selectors
1078     @abstract       AudioObjectPropertySelector values provided by the AudioControl class.
1079     @discussion     The AudioControl class is a subclass of the AudioObject class. The class has
1080                     just the global scope, kAudioObjectPropertyScopeGlobal, and only a master
1081                     element.
1082     @constant       kAudioControlPropertyScope
1083                         An AudioServerPlugIn_PropertyScope that indicates which part of a device the
1084                         control applies to.
1085     @constant       kAudioControlPropertyElement
1086                         An AudioServerPlugIn_PropertyElement that indicates which element of the
1087                         device the control applies to.
1088 }
1089 const
1090 	kAudioControlPropertyScope = FourCharCode('cscp');
1091 	kAudioControlPropertyElement = FourCharCode('celm');
1092 
1093 //==================================================================================================
1094 //#pragma mark -
1095 //#pragma mark AudioSliderControl Constants
1096 
1097 {!
1098     @enum           AudioSliderControl Class Constants
1099     @abstract       Various constants related to the AudioSliderControl class.
1100     @constant       kAudioSliderControlClassID
1101                         The AudioClassID that identifies the AudioSliderControl class.
1102 }
1103 const
1104 	kAudioSliderControlClassID = FourCharCode('sldr');
1105 
1106 {!
1107     @enum           AudioSliderControl Property Selectors
1108     @abstract       AudioObjectPropertySelector values provided by the AudioSliderControl class.
1109     @discussion     The AudioSliderControl class is a subclass of the AudioControl class and has the
1110                     same scope and element structure.
1111     @constant       kAudioSliderControlPropertyValue
1112                         A UInt32 that represents the value of the slider control.
1113     @constant       kAudioSliderControlPropertyRange
1114                         An array of two UInt32s that represents the inclusive range of values the
1115                         slider control can take.
1116 }
1117 const
1118 	kAudioSliderControlPropertyValue = FourCharCode('sdrv');
1119 	kAudioSliderControlPropertyRange = FourCharCode('sdrr');
1120 
1121 //==================================================================================================
1122 //#pragma mark -
1123 //#pragma mark AudioLevelControl Constants
1124 
1125 {!
1126     @enum           AudioLevelControl Class Constants
1127     @abstract       Various constants related to the AudioLevelControl class.
1128     @constant       kAudioLevelControlClassID
1129                         The AudioClassID that identifies the LevelControl class.
1130     @constant       kAudioVolumeControlClassID
1131                         A subclass of the LevelControl class that implements a general
1132                         gain/attenuation stage.
1133     @constant       kAudioLFEVolumeControlClassID
1134                         A subclass of the LevelControl class for an LFE channel that results from
1135                         bass management. Note that LFE channels that are represented as normal audio
1136                         channels must use kAudioVolumeControlClassID to manipulate the level.
1137 }
1138 const
1139 	kAudioLevelControlClassID = FourCharCode('levl');
1140 	kAudioVolumeControlClassID = FourCharCode('vlme');
1141 	kAudioLFEVolumeControlClassID = FourCharCode('subv');
1142 
1143 {!
1144     @enum           AudioLevelControl Property Selectors
1145     @abstract       AudioObjectPropertySelector values provided by the AudioLevelControl class.
1146     @discussion     The AudioLevelControl class is a subclass of the AudioControl class and has the
1147                     same scope and element structure.
1148     @constant       kAudioLevelControlPropertyScalarValue
1149                         A Float32 that represents the value of the volume control. The range is
1150                         between 0.0 and 1.0 (inclusive). Note that the set of all Float32 values
1151                         between 0.0 and 1.0 inclusive is much larger than the set of actual values
1152                         that the hardware can select. This means that the Float32 range has a many
1153                         to one mapping with the underlying hardware values. As such, setting a
1154                         scalar value will result in the control taking on the value nearest to what
1155                         was set.
1156     @constant       kAudioLevelControlPropertyDecibelValue
1157                         A Float32 that represents the value of the volume control in dB. Note that
1158                         the set of all Float32 values in the dB range for the control is much larger
1159                         than the set of actual values that the hardware can select. This means that
1160                         the Float32 range has a many to one mapping with the underlying hardware
1161                         values. As such, setting a dB value will result in the control taking on the
1162                         value nearest to what was set.
1163     @constant       kAudioLevelControlPropertyDecibelRange
1164                         An AudioValueRange that contains the minimum and maximum dB values the
1165                         control can have.
1166     @constant       kAudioLevelControlPropertyConvertScalarToDecibels
1167                         A Float32 that on input contains a scalar volume value for the and on exit
1168                         contains the equivalent dB value.
1169     @constant       kAudioLevelControlPropertyConvertDecibelsToScalar
1170                         A Float32 that on input contains a dB volume value for the and on exit
1171                         contains the equivalent scalar value.
1172 }
1173 const
1174 	kAudioLevelControlPropertyScalarValue = FourCharCode('lcsv');
1175 	kAudioLevelControlPropertyDecibelValue = FourCharCode('lcdv');
1176 	kAudioLevelControlPropertyDecibelRange = FourCharCode('lcdr');
1177 	kAudioLevelControlPropertyConvertScalarToDecibels = FourCharCode('lcsd');
1178 	kAudioLevelControlPropertyConvertDecibelsToScalar = FourCharCode('lcds');
1179 
1180 //==================================================================================================
1181 //#pragma mark -
1182 //#pragma mark AudioBooleanControl Constants
1183 
1184 {!
1185     @enum           AudioBooleanControl Class Constants
1186     @abstract       Various constants related to the AudioBooleanControl class.
1187     @constant       kAudioBooleanControlClassID
1188                         The AudioClassID that identifies the BooleanControl class.
1189     @constant       kAudioMuteControlClassID
1190                         A subclass of the AudioBooleanControl class where a true value means that
1191                         mute is enabled making that element inaudible.
1192     @constant       kAudioSoloControlClassID
1193                         A subclass of the AudioBooleanControl class where a true value means that
1194                         solo is enabled making just that element audible and the other elements
1195                         inaudible.
1196     @constant       kAudioJackControlClassID
1197                         A subclass of the AudioBooleanControl class where a true value means
1198                         something is plugged into that element.
1199     @constant       kAudioLFEMuteControlClassID
1200                         A subclass of the AudioBooleanControl class where true means that mute is
1201                         enabled making that LFE element inaudible. This control is for LFE channels
1202                         that result from bass management. Note that LFE channels that are
1203                         represented as normal audio channels must use an AudioMuteControl.
1204     @constant       kAudioPhantomPowerControlClassID
1205                         A subclass of the AudioBooleanControl class where true means that the
1206                         element's hardware has phantom power enabled.
1207     @constant       kAudioPhaseInvertControlClassID
1208                         A subclass of the AudioBooleanControl class where true means that the phase
1209                         of the signal on the given element is being inverted by 180 degrees.
1210     @constant       kAudioClipLightControlClassID
1211                         A subclass of the AudioBooleanControl class where true means that the signal
1212                         for the element has exceeded the sample range. Once a clip light is turned
1213                         on, it is to stay on until either the value of the control is set to false
1214                         or the current IO session stops and a new IO session starts.
1215     @constant       kAudioTalkbackControlClassID
1216                         An AudioBooleanControl where true means that the talkback channel is
1217                         enabled. This control is for talkback channels that are handled outside of
1218                         the regular IO channels. If the talkback channel is among the normal IO
1219                         channels, it will use AudioMuteControl.
1220     @constant       kAudioListenbackControlClassID
1221                         An AudioBooleanControl where true means that the listenback channel is
1222                         audible. This control is for listenback channels that are handled outside of
1223                         the regular IO channels. If the listenback channel is among the normal IO
1224                         channels, it will use AudioMuteControl.
1225 }
1226 const
1227 	kAudioBooleanControlClassID = FourCharCode('togl');
1228 	kAudioMuteControlClassID = FourCharCode('mute');
1229 	kAudioSoloControlClassID = FourCharCode('solo');
1230 	kAudioJackControlClassID = FourCharCode('jack');
1231 	kAudioLFEMuteControlClassID = FourCharCode('subm');
1232 	kAudioPhantomPowerControlClassID = FourCharCode('phan');
1233 	kAudioPhaseInvertControlClassID = FourCharCode('phsi');
1234 	kAudioClipLightControlClassID = FourCharCode('clip');
1235 	kAudioTalkbackControlClassID = FourCharCode('talb');
1236 	kAudioListenbackControlClassID = FourCharCode('lsnb');
1237 
1238 {!
1239     @enum           AudioBooleanControl Property Selectors
1240     @abstract       AudioObjectPropertySelector values provided by the AudioBooleanControl class.
1241     @discussion     The AudioBooleanControl class is a subclass of the AudioControl class and has
1242                     the same scope and element structure.
1243     @constant       kAudioBooleanControlPropertyValue
1244                         A UInt32 where 0 means off/false and non-zero means on/true.
1245 }
1246 const
1247 	kAudioBooleanControlPropertyValue = FourCharCode('bcvl');
1248 
1249 //==================================================================================================
1250 //#pragma mark -
1251 //#pragma mark AudioSelectorControl Constants
1252 
1253 {!
1254     @enum           AudioSelectorControl Class Constants
1255     @abstract       Various constants related to the AudioSelectorControl class.
1256     @constant       kAudioSelectorControlClassID
1257                         The AudioClassID that identifies the AudioSelectorControl class.
1258     @constant       kAudioDataSourceControlClassID
1259                         A subclass of the AudioSelectorControl class that identifies where the data
1260                         for the element is coming from.
1261     @constant       kAudioDataDestinationControlClassID
1262                         A subclass of the AudioSelectorControl class that identifies where the data
1263                         for the element is going.
1264     @constant       kAudioClockSourceControlClassID
1265                         A subclass of the AudioSelectorControl class that identifies where the
1266                         timing info for the object is coming from.
1267     @constant       kAudioLineLevelControlClassID
1268                         A subclass of the AudioSelectorControl class that identifies the nominal
1269                         line level for the element. Note that this is not a gain stage but rather
1270                         indicating the voltage standard (if any) used for the element, such as
1271                         +4dBu, -10dBV, instrument, etc.
1272     @constant       kAudioHighPassFilterControlClassID
1273                         A subclass of the AudioSelectorControl class that indicates the setting for
1274                         the high pass filter on the given element.
1275 }
1276 const
1277 	kAudioSelectorControlClassID = FourCharCode('slct');
1278 	kAudioDataSourceControlClassID = FourCharCode('dsrc');
1279 	kAudioDataDestinationControlClassID = FourCharCode('dest');
1280 	kAudioClockSourceControlClassID = FourCharCode('clck');
1281 	kAudioLineLevelControlClassID = FourCharCode('nlvl');
1282 	kAudioHighPassFilterControlClassID = FourCharCode('hipf');
1283 
1284 {!
1285     @enum           AudioSelectorControl Property Selectors
1286     @abstract       AudioObjectPropertySelector values provided by the AudioSelectorControl class.
1287     @discussion     The AudioSelectorControl class is a subclass of the AudioControl class and has
1288                     the same scope and element structure.
1289     @constant       kAudioSelectorControlPropertyCurrentItem
1290                         An array of UInt32s that are the IDs of the items currently selected.
1291     @constant       kAudioSelectorControlPropertyAvailableItems
1292                         An array of UInt32s that represent the IDs of all the items available.
1293     @constant       kAudioSelectorControlPropertyItemName
1294                         This property translates the given item ID into a human readable name. The
1295                         qualifier contains the ID of the item to be translated and name is returned
1296                         as a CFString as the property data. The caller is responsible for releasing
1297                         the returned CFObject.
1298     @constant       kAudioSelectorControlPropertyItemKind
1299                         This property returns a UInt32 that identifies the kind of selector item the
1300                         item ID refers to. The qualifier contains the ID of the item. Note that this
1301                         property is optional for selector controls and that the meaning of the value
1302                         depends on the specifc subclass being queried.
1303 }
1304 const
1305 	kAudioSelectorControlPropertyCurrentItem = FourCharCode('scci');
1306 	kAudioSelectorControlPropertyAvailableItems = FourCharCode('scai');
1307 	kAudioSelectorControlPropertyItemName = FourCharCode('scin');
1308 	kAudioSelectorControlPropertyItemKind = FourCharCode('clkk');
1309 
1310 {!
1311     @enum           Constants for the value of the property, kAudioSelectorControlPropertyItemKind
1312                     for any selector control item
1313     @constant       kAudioSelectorControlItemKindSpacer
1314                         This ID represents an item in a selector control's range that represents a
1315                         spacer item in a pop-up menu. Items with this kind are not be selectable.
1316 }
1317 const
1318 	kAudioSelectorControlItemKindSpacer = FourCharCode('spcr');
1319 
1320 {!
1321     @enum           Constants for the value of the property, kAudioSelectorControlPropertyItemKind
1322                     for AudioClockSourceControls.
1323     @constant       kAudioClockSourceItemKindInternal
1324                         This ID represents the device's internal clock.
1325 }
1326 const
1327 	kAudioClockSourceItemKindInternal = FourCharCode('int ');
1328 
1329 //==================================================================================================
1330 //#pragma mark -
1331 //#pragma mark AudioStereoPanControl Constants
1332 
1333 {!
1334     @enum           AudioStereoPanControl Class Constants
1335     @abstract       Various constants related to the AudioStereoPanControl class.
1336     @constant       kAudioStereoPanControlClassID
1337                         The AudioClassID that identifies the StereoPanControl class.
1338 }
1339 const
1340 	kAudioStereoPanControlClassID = FourCharCode('span');
1341 
1342 {!
1343     @enum           AudioStereoPanControl Property Selectors
1344     @abstract       AudioObjectPropertySelector values provided by the AudioStereoPanControl class.
1345     @discussion     The AudioStereoPanControl class is a subclass of the AudioControl class and has
1346                     the same scope and element structure.
1347     @constant       kAudioStereoPanControlPropertyValue
1348                         A Float32 where 0.0 is full left, 1.0 is full right, and 0.5 is center.
1349     @constant       kAudioStereoPanControlPropertyPanningChannels
1350                         An array of two UInt32s that indicate which elements of the device the
1351                         signal is being panned between.
1352 }
1353 const
1354 	kAudioStereoPanControlPropertyValue = FourCharCode('spcv');
1355 	kAudioStereoPanControlPropertyPanningChannels = FourCharCode('spcc');
1356 
1357 //==================================================================================================
1358 
1359 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
1360 
1361 end.
1362 {$endc} {not MACOSALLINCLUDE}
1363