objc2_core_audio/generated/
AudioHardwareDeprecated.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5#[cfg(feature = "objc2")]
6use objc2::__framework_prelude::*;
7#[cfg(feature = "objc2-core-audio-types")]
8use objc2_core_audio_types::*;
9use objc2_core_foundation::*;
10
11use crate::*;
12
13/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiohardwarerunloopmode?language=objc)
14pub const kAudioHardwareRunLoopMode: &CStr =
15    unsafe { CStr::from_bytes_with_nul_unchecked(b"com.apple.audio.CoreAudio\0") };
16/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudioaggregatedevicemastersubdevicekey?language=objc)
17pub const kAudioAggregateDeviceMasterSubDeviceKey: &CStr =
18    unsafe { CStr::from_bytes_with_nul_unchecked(b"master\0") };
19/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertyscopeinput?language=objc)
20#[cfg(feature = "AudioHardware")]
21pub const kAudioDevicePropertyScopeInput: AudioObjectPropertyScope = kAudioObjectPropertyScopeInput;
22/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertyscopeoutput?language=objc)
23#[cfg(feature = "AudioHardware")]
24pub const kAudioDevicePropertyScopeOutput: AudioObjectPropertyScope =
25    kAudioObjectPropertyScopeOutput;
26/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertyscopeplaythrough?language=objc)
27#[cfg(feature = "AudioHardware")]
28pub const kAudioDevicePropertyScopePlayThrough: AudioObjectPropertyScope =
29    kAudioObjectPropertyScopePlayThrough;
30
31/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiopropertywildcardpropertyid?language=objc)
32#[cfg(feature = "AudioHardware")]
33pub const kAudioPropertyWildcardPropertyID: AudioObjectPropertySelector =
34    kAudioObjectPropertySelectorWildcard;
35
36/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiopropertywildcardsection?language=objc)
37pub const kAudioPropertyWildcardSection: c_uchar = 0xFF;
38
39/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiopropertywildcardchannel?language=objc)
40#[cfg(feature = "AudioHardware")]
41pub const kAudioPropertyWildcardChannel: AudioObjectPropertyElement =
42    kAudioObjectPropertyElementWildcard;
43
44/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudioisubownercontrolclassid?language=objc)
45#[cfg(feature = "AudioHardware")]
46pub const kAudioISubOwnerControlClassID: AudioClassID = 0x61746368;
47
48/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiolevelcontrolpropertydecibelstoscalartransferfunction?language=objc)
49#[cfg(feature = "AudioHardware")]
50pub const kAudioLevelControlPropertyDecibelsToScalarTransferFunction: AudioObjectPropertySelector =
51    0x6c637466;
52
53/// The following constants are the only supported values for a volume control's
54/// transfer function.
55///
56/// The transfer function implemented in the volume control works by raising the
57/// scalar value to an exponent to map it into the decibel range. The constants
58/// in this enum express the exponent used in the name as a quotient. For example,
59/// kAudioLevelControlTranferFunction3Over4 represents the exponent 0.75.
60///
61/// See also [Apple's documentation](https://developer.apple.com/documentation/coreaudio/audiolevelcontroltransferfunction?language=objc)
62// NS_ENUM
63#[repr(transparent)]
64#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
65pub struct AudioLevelControlTransferFunction(pub u32);
66impl AudioLevelControlTransferFunction {
67    #[doc(alias = "kAudioLevelControlTranferFunctionLinear")]
68    pub const TranferFunctionLinear: Self = Self(0);
69    #[doc(alias = "kAudioLevelControlTranferFunction1Over3")]
70    pub const TranferFunction1Over3: Self = Self(1);
71    #[doc(alias = "kAudioLevelControlTranferFunction1Over2")]
72    pub const TranferFunction1Over2: Self = Self(2);
73    #[doc(alias = "kAudioLevelControlTranferFunction3Over4")]
74    pub const TranferFunction3Over4: Self = Self(3);
75    #[doc(alias = "kAudioLevelControlTranferFunction3Over2")]
76    pub const TranferFunction3Over2: Self = Self(4);
77    #[doc(alias = "kAudioLevelControlTranferFunction2Over1")]
78    pub const TranferFunction2Over1: Self = Self(5);
79    #[doc(alias = "kAudioLevelControlTranferFunction3Over1")]
80    pub const TranferFunction3Over1: Self = Self(6);
81    #[doc(alias = "kAudioLevelControlTranferFunction4Over1")]
82    pub const TranferFunction4Over1: Self = Self(7);
83    #[doc(alias = "kAudioLevelControlTranferFunction5Over1")]
84    pub const TranferFunction5Over1: Self = Self(8);
85    #[doc(alias = "kAudioLevelControlTranferFunction6Over1")]
86    pub const TranferFunction6Over1: Self = Self(9);
87    #[doc(alias = "kAudioLevelControlTranferFunction7Over1")]
88    pub const TranferFunction7Over1: Self = Self(10);
89    #[doc(alias = "kAudioLevelControlTranferFunction8Over1")]
90    pub const TranferFunction8Over1: Self = Self(11);
91    #[doc(alias = "kAudioLevelControlTranferFunction9Over1")]
92    pub const TranferFunction9Over1: Self = Self(12);
93    #[doc(alias = "kAudioLevelControlTranferFunction10Over1")]
94    pub const TranferFunction10Over1: Self = Self(13);
95    #[doc(alias = "kAudioLevelControlTranferFunction11Over1")]
96    pub const TranferFunction11Over1: Self = Self(14);
97    #[doc(alias = "kAudioLevelControlTranferFunction12Over1")]
98    pub const TranferFunction12Over1: Self = Self(15);
99}
100
101#[cfg(feature = "objc2")]
102unsafe impl Encode for AudioLevelControlTransferFunction {
103    const ENCODING: Encoding = u32::ENCODING;
104}
105
106#[cfg(feature = "objc2")]
107unsafe impl RefEncode for AudioLevelControlTransferFunction {
108    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
109}
110
111/// An AudioHardwarePropertyID is a integer that identifies a specific piece of
112/// information about the AudioSystemObject.
113///
114/// See also [Apple's documentation](https://developer.apple.com/documentation/coreaudio/audiohardwarepropertyid?language=objc)
115#[cfg(feature = "AudioHardware")]
116pub type AudioHardwarePropertyID = AudioObjectPropertySelector;
117
118/// Clients register an AudioHardwarePropertyListenerProc with the AudioSystemObject
119/// in order to receive notifications when the properties of the object change.
120///
121/// Note that the same functionality is provided by AudioObjectPropertyListenerProc.
122///
123/// Parameter `inPropertyID`: The AudioHardwarePropertyID of the property that changed.
124///
125/// Parameter `inClientData`: A pointer to client data established when the listener proc was registered
126/// with the AudioSystemObject.
127///
128/// Returns: The return value is currently unused and should always be 0.
129///
130/// See also [Apple's documentation](https://developer.apple.com/documentation/coreaudio/audiohardwarepropertylistenerproc?language=objc)
131#[cfg(feature = "AudioHardware")]
132pub type AudioHardwarePropertyListenerProc =
133    Option<unsafe extern "C-unwind" fn(AudioHardwarePropertyID, *mut c_void) -> OSStatus>;
134
135/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiohardwarepropertyrunloop?language=objc)
136#[cfg(feature = "AudioHardware")]
137pub const kAudioHardwarePropertyRunLoop: AudioObjectPropertySelector = 0x726e6c70;
138/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiohardwarepropertydeviceforuid?language=objc)
139#[cfg(feature = "AudioHardware")]
140pub const kAudioHardwarePropertyDeviceForUID: AudioObjectPropertySelector = 0x64756964;
141/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiohardwarepropertypluginforbundleid?language=objc)
142#[cfg(feature = "AudioHardware")]
143pub const kAudioHardwarePropertyPlugInForBundleID: AudioObjectPropertySelector = 0x70696269;
144/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiohardwarepropertyprocessismaster?language=objc)
145#[cfg(feature = "AudioHardware")]
146#[deprecated]
147pub const kAudioHardwarePropertyProcessIsMaster: AudioObjectPropertySelector = 0x6d617374;
148
149/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiohardwarepropertybootchimevolumescalar?language=objc)
150#[cfg(feature = "AudioHardware")]
151pub const kAudioHardwarePropertyBootChimeVolumeScalar: AudioObjectPropertySelector = 0x62627673;
152/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiohardwarepropertybootchimevolumedecibels?language=objc)
153#[cfg(feature = "AudioHardware")]
154pub const kAudioHardwarePropertyBootChimeVolumeDecibels: AudioObjectPropertySelector = 0x62627664;
155/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiohardwarepropertybootchimevolumerangedecibels?language=objc)
156#[cfg(feature = "AudioHardware")]
157pub const kAudioHardwarePropertyBootChimeVolumeRangeDecibels: AudioObjectPropertySelector =
158    0x62626423;
159/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiohardwarepropertybootchimevolumescalartodecibels?language=objc)
160#[cfg(feature = "AudioHardware")]
161pub const kAudioHardwarePropertyBootChimeVolumeScalarToDecibels: AudioObjectPropertySelector =
162    0x62763264;
163/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiohardwarepropertybootchimevolumedecibelstoscalar?language=objc)
164#[cfg(feature = "AudioHardware")]
165pub const kAudioHardwarePropertyBootChimeVolumeDecibelsToScalar: AudioObjectPropertySelector =
166    0x62643276;
167/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiohardwarepropertybootchimevolumedecibelstoscalartransferfunction?language=objc)
168#[cfg(feature = "AudioHardware")]
169pub const kAudioHardwarePropertyBootChimeVolumeDecibelsToScalarTransferFunction:
170    AudioObjectPropertySelector = 0x62767466;
171
172extern "C-unwind" {
173    /// Add the given CFRunLoopSource to the the HAL's notification CFRunLoop.
174    ///
175    /// The CFRunLoop the HAL uses for notifications is specified by
176    /// kAudioHardwarePropertyRunLoop. If kAudioHardwarePropertyRunLoop changes,
177    /// CFRunLoopSources added with this function will automatically be transferred to
178    /// the new CFRunLoop.
179    /// Usage of the HAL's notification run loop is deprecated. Please use libdispatch
180    /// instead.
181    ///
182    /// Parameter `inRunLoopSource`: The CFRunLoopSource to add.
183    ///
184    /// Returns: An OSStatus indicating success or failure.
185    #[deprecated]
186    pub fn AudioHardwareAddRunLoopSource(in_run_loop_source: &CFRunLoopSource) -> OSStatus;
187}
188
189extern "C-unwind" {
190    /// Remove the given CFRunLoopSource from the the HAL's notification CFRunLoop.
191    ///
192    /// The CFRunLoop the HAL uses for notifications is specified by
193    /// kAudioHardwarePropertyRunLoop.
194    /// Usage of the HAL's notification run loop is deprecated. Please use libdispatch
195    /// instead.
196    ///
197    /// Parameter `inRunLoopSource`: The CFRunLoopSource to remove.
198    ///
199    /// Returns: An OSStatus indicating success or failure.
200    #[deprecated]
201    pub fn AudioHardwareRemoveRunLoopSource(in_run_loop_source: &CFRunLoopSource) -> OSStatus;
202}
203
204extern "C-unwind" {
205    /// Retrieve information about the given property.
206    ///
207    /// Note that the same functionality is provided by the functions
208    /// AudioObjectHasProperty(), AudioObjectIsPropertySettable(), and
209    /// AudioObjectGetPropertyDataSize().
210    ///
211    /// Parameter `inPropertyID`: The AudioHardwarePropertyID of the property to query.
212    ///
213    /// Parameter `outSize`: A pointer to a UInt32 that receives the size of the property data in bytes
214    /// on exit. This can be NULL if the size information is not being requested.
215    ///
216    /// Parameter `outWritable`: A pointer to a Boolean that receives indication of whether or not the given
217    /// property can be set. This can be NULL if the writability is not being
218    /// requested.
219    ///
220    /// Returns: An OSStatus indicating success or failure.
221    #[cfg(feature = "AudioHardware")]
222    #[deprecated]
223    pub fn AudioHardwareGetPropertyInfo(
224        in_property_id: AudioHardwarePropertyID,
225        out_size: *mut u32,
226        out_writable: *mut Boolean,
227    ) -> OSStatus;
228}
229
230extern "C-unwind" {
231    /// Queries an the AudioSystemObject to get the data of the given property and
232    /// places it in the provided buffer.
233    ///
234    /// Note that the same functionality is provided by the function
235    /// AudioObjectGetPropertyData().
236    ///
237    /// Parameter `inPropertyID`: The AudioHardwarePropertyID of the property to query.
238    ///
239    /// Parameter `ioPropertyDataSize`: A UInt32 which on entry indicates the size of the buffer pointed to by
240    /// outData and on exit indicates how much of the buffer was used.
241    ///
242    /// Parameter `outPropertyData`: The buffer into which the AudioSystemObject will put the data for the given
243    /// property.
244    ///
245    /// Returns: An OSStatus indicating success or failure.
246    #[cfg(feature = "AudioHardware")]
247    #[deprecated]
248    pub fn AudioHardwareGetProperty(
249        in_property_id: AudioHardwarePropertyID,
250        io_property_data_size: NonNull<u32>,
251        out_property_data: NonNull<c_void>,
252    ) -> OSStatus;
253}
254
255extern "C-unwind" {
256    /// Tells the AudioSystemObject to change the value of the given property using the
257    /// provided data.
258    ///
259    /// Note that the value of the property should not be considered changed until the
260    /// HAL has called the listeners as many properties values are changed
261    /// asynchronously. Also note that the same functionality is provided by the
262    /// function AudioObjectGetPropertyData().
263    ///
264    /// Parameter `inPropertyID`: The AudioHardwarePropertyID of the property to change.
265    ///
266    /// Parameter `inPropertyDataSize`: A UInt32 indicating the size of the buffer pointed to by inData.
267    ///
268    /// Parameter `inPropertyData`: The buffer containing the data to be used to change the property's value.
269    ///
270    /// Returns: An OSStatus indicating success or failure.
271    #[cfg(feature = "AudioHardware")]
272    #[deprecated]
273    pub fn AudioHardwareSetProperty(
274        in_property_id: AudioHardwarePropertyID,
275        in_property_data_size: u32,
276        in_property_data: NonNull<c_void>,
277    ) -> OSStatus;
278}
279
280extern "C-unwind" {
281    /// Registers the given AudioHardwarePropertyListenerProc to receive notifications
282    /// when the given property changes.
283    ///
284    /// Note that the same functionality is provided by AudioObjectAddPropertyListener
285    /// in conjunction with AudioObjectPropertyListenerProc.
286    ///
287    /// Parameter `inPropertyID`: The AudioHardwarePropertyID of the property to listen to.
288    ///
289    /// Parameter `inProc`: AudioHardwarePropertyListenerProc to call.
290    ///
291    /// Parameter `inClientData`: A pointer to client data that is passed to the listener when it is called.
292    ///
293    /// Returns: An OSStatus indicating success or failure.
294    #[cfg(feature = "AudioHardware")]
295    #[deprecated]
296    pub fn AudioHardwareAddPropertyListener(
297        in_property_id: AudioHardwarePropertyID,
298        in_proc: AudioHardwarePropertyListenerProc,
299        in_client_data: *mut c_void,
300    ) -> OSStatus;
301}
302
303extern "C-unwind" {
304    /// Unregisters the given AudioHardwarePropertyListenerProc from receive
305    /// notifications when the given property changes.
306    ///
307    /// Note that the same functionality is provided by
308    /// AudioObjectRemovePropertyListener in conjunction with
309    /// AudioObjectPropertyListenerProc.
310    ///
311    /// Parameter `inPropertyID`: The AudioHardwarePropertyID of the property to stop listening to.
312    ///
313    /// Parameter `inProc`: AudioHardwarePropertyListenerProc to unregister.
314    ///
315    /// Returns: An OSStatus indicating success or failure.
316    #[cfg(feature = "AudioHardware")]
317    #[deprecated]
318    pub fn AudioHardwareRemovePropertyListener(
319        in_property_id: AudioHardwarePropertyID,
320        in_proc: AudioHardwarePropertyListenerProc,
321    ) -> OSStatus;
322}
323
324/// AudioDevice is the base class for all objects that represent an audio device.
325///
326/// AudioDevice is a subclass of AudioObject. AudioDevices normally contain
327/// AudioStreams and AudioControls, but may contain other things depending on the
328/// kind of AudioDevice (e.g. aggregate devices contain other AudioDevices).
329///
330/// See also [Apple's documentation](https://developer.apple.com/documentation/coreaudio/audiodeviceid?language=objc)
331#[cfg(feature = "AudioHardware")]
332pub type AudioDeviceID = AudioObjectID;
333
334/// An AudioDevicePropertyID is an integer that identifies a specific piece of
335/// information about the object.
336///
337/// See also [Apple's documentation](https://developer.apple.com/documentation/coreaudio/audiodevicepropertyid?language=objc)
338#[cfg(feature = "AudioHardware")]
339pub type AudioDevicePropertyID = AudioObjectPropertySelector;
340
341/// Clients register an AudioDevicePropertyListenerProc with the AudioDevice object
342/// in order to receive notifications when the properties of the object change.
343///
344/// Note that the same functionality is provided by AudioObjectPropertyListenerProc.
345///
346/// Parameter `inDevice`: The AudioDevice whose property has changed.
347///
348/// Parameter `inChannel`: The channel of the property that changed where 0 is the main channel.
349///
350/// Parameter `isInput`: Which section of the AudioDevice changed.
351///
352/// Parameter `inPropertyID`: The AudioDevicePropertyID of the property that changed.
353///
354/// Parameter `inClientData`: A pointer to client data established when the listener proc was registered
355/// with the object.
356///
357/// Returns: The return value is currently unused and should always be 0.
358///
359/// See also [Apple's documentation](https://developer.apple.com/documentation/coreaudio/audiodevicepropertylistenerproc?language=objc)
360#[cfg(feature = "AudioHardware")]
361pub type AudioDevicePropertyListenerProc = Option<
362    unsafe extern "C-unwind" fn(
363        AudioDeviceID,
364        u32,
365        Boolean,
366        AudioDevicePropertyID,
367        *mut c_void,
368    ) -> OSStatus,
369>;
370
371/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodeviceunknown?language=objc)
372#[cfg(feature = "AudioHardware")]
373pub const kAudioDeviceUnknown: AudioObjectID = kAudioObjectUnknown;
374
375/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicetransporttypeautoaggregate?language=objc)
376pub const kAudioDeviceTransportTypeAutoAggregate: u32 = 0x66677270;
377
378/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertyvolumedecibelstoscalartransferfunction?language=objc)
379#[cfg(feature = "AudioHardware")]
380pub const kAudioDevicePropertyVolumeDecibelsToScalarTransferFunction: AudioObjectPropertySelector =
381    0x76637466;
382/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertyplaythruvolumedecibelstoscalartransferfunction?language=objc)
383#[cfg(feature = "AudioHardware")]
384pub const kAudioDevicePropertyPlayThruVolumeDecibelsToScalarTransferFunction:
385    AudioObjectPropertySelector = 0x6d767466;
386/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertydrivershouldownisub?language=objc)
387#[cfg(feature = "AudioHardware")]
388pub const kAudioDevicePropertyDriverShouldOwniSub: AudioObjectPropertySelector = 0x69737562;
389/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertysubvolumedecibelstoscalartransferfunction?language=objc)
390#[cfg(feature = "AudioHardware")]
391pub const kAudioDevicePropertySubVolumeDecibelsToScalarTransferFunction:
392    AudioObjectPropertySelector = 0x73767466;
393
394/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertydevicename?language=objc)
395#[cfg(feature = "AudioHardware")]
396pub const kAudioDevicePropertyDeviceName: AudioObjectPropertySelector = 0x6e616d65;
397/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertydevicenamecfstring?language=objc)
398#[cfg(feature = "AudioHardware")]
399pub const kAudioDevicePropertyDeviceNameCFString: AudioObjectPropertySelector =
400    kAudioObjectPropertyName;
401/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertydevicemanufacturer?language=objc)
402#[cfg(feature = "AudioHardware")]
403pub const kAudioDevicePropertyDeviceManufacturer: AudioObjectPropertySelector = 0x6d616b72;
404/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertydevicemanufacturercfstring?language=objc)
405#[cfg(feature = "AudioHardware")]
406pub const kAudioDevicePropertyDeviceManufacturerCFString: AudioObjectPropertySelector =
407    kAudioObjectPropertyManufacturer;
408/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertyregisterbufferlist?language=objc)
409#[cfg(feature = "AudioHardware")]
410pub const kAudioDevicePropertyRegisterBufferList: AudioObjectPropertySelector = 0x72627566;
411/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertybuffersize?language=objc)
412#[cfg(feature = "AudioHardware")]
413pub const kAudioDevicePropertyBufferSize: AudioObjectPropertySelector = 0x6273697a;
414/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertybuffersizerange?language=objc)
415#[cfg(feature = "AudioHardware")]
416pub const kAudioDevicePropertyBufferSizeRange: AudioObjectPropertySelector = 0x62737a23;
417/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertychannelname?language=objc)
418#[cfg(feature = "AudioHardware")]
419pub const kAudioDevicePropertyChannelName: AudioObjectPropertySelector = 0x63686e6d;
420/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertychannelnamecfstring?language=objc)
421#[cfg(feature = "AudioHardware")]
422pub const kAudioDevicePropertyChannelNameCFString: AudioObjectPropertySelector =
423    kAudioObjectPropertyElementName;
424/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertychannelcategoryname?language=objc)
425#[cfg(feature = "AudioHardware")]
426pub const kAudioDevicePropertyChannelCategoryName: AudioObjectPropertySelector = 0x63636e6d;
427/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertychannelcategorynamecfstring?language=objc)
428#[cfg(feature = "AudioHardware")]
429pub const kAudioDevicePropertyChannelCategoryNameCFString: AudioObjectPropertySelector =
430    kAudioObjectPropertyElementCategoryName;
431/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertychannelnumbername?language=objc)
432#[cfg(feature = "AudioHardware")]
433pub const kAudioDevicePropertyChannelNumberName: AudioObjectPropertySelector = 0x636e6e6d;
434/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertychannelnumbernamecfstring?language=objc)
435#[cfg(feature = "AudioHardware")]
436pub const kAudioDevicePropertyChannelNumberNameCFString: AudioObjectPropertySelector =
437    kAudioObjectPropertyElementNumberName;
438/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertysupportsmixing?language=objc)
439#[cfg(feature = "AudioHardware")]
440pub const kAudioDevicePropertySupportsMixing: AudioObjectPropertySelector = 0x6d69783f;
441/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertystreamformat?language=objc)
442#[cfg(feature = "AudioHardware")]
443pub const kAudioDevicePropertyStreamFormat: AudioObjectPropertySelector = 0x73666d74;
444/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertystreamformats?language=objc)
445#[cfg(feature = "AudioHardware")]
446pub const kAudioDevicePropertyStreamFormats: AudioObjectPropertySelector = 0x73666d23;
447/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertystreamformatsupported?language=objc)
448#[cfg(feature = "AudioHardware")]
449pub const kAudioDevicePropertyStreamFormatSupported: AudioObjectPropertySelector = 0x73666d3f;
450/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertystreamformatmatch?language=objc)
451#[cfg(feature = "AudioHardware")]
452pub const kAudioDevicePropertyStreamFormatMatch: AudioObjectPropertySelector = 0x73666d6d;
453/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertydatasourcenameforid?language=objc)
454#[cfg(feature = "AudioHardware")]
455pub const kAudioDevicePropertyDataSourceNameForID: AudioObjectPropertySelector = 0x7373636e;
456/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertyclocksourcenameforid?language=objc)
457#[cfg(feature = "AudioHardware")]
458pub const kAudioDevicePropertyClockSourceNameForID: AudioObjectPropertySelector = 0x6373636e;
459/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertyplaythrudestinationnameforid?language=objc)
460#[cfg(feature = "AudioHardware")]
461pub const kAudioDevicePropertyPlayThruDestinationNameForID: AudioObjectPropertySelector =
462    0x6d64646e;
463/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertychannelnominallinelevelnameforid?language=objc)
464#[cfg(feature = "AudioHardware")]
465pub const kAudioDevicePropertyChannelNominalLineLevelNameForID: AudioObjectPropertySelector =
466    0x636e6c76;
467/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiodevicepropertyhighpassfiltersettingnameforid?language=objc)
468#[cfg(feature = "AudioHardware")]
469pub const kAudioDevicePropertyHighPassFilterSettingNameForID: AudioObjectPropertySelector =
470    0x63686970;
471
472extern "C-unwind" {
473    /// Registers the given AudioDeviceIOProc with the AudioDevice.
474    ///
475    /// A client may have multiple IOProcs for a given device, but the device is free to
476    /// only accept as many as it can handle. Note that it is not recommended for
477    /// clients to have more than a single IOProc registered at a time as this can be
478    /// wasteful of system resources. Rather, it is recommended that the client do any
479    /// necessary mixing itself so that only one IOProc is necessary.
480    /// This routine has been deprecated in favor of AudioDeviceCreateIOProcID().
481    ///
482    /// Parameter `inDevice`: The AudioDevice to register the IOProc with.
483    ///
484    /// Parameter `inProc`: The AudioDeviceIOProc to register.
485    ///
486    /// Parameter `inClientData`: A pointer to client data that is passed back to the IOProc when it is
487    /// called.
488    ///
489    /// Returns: An OSStatus indicating success or failure.
490    #[cfg(all(feature = "AudioHardware", feature = "objc2-core-audio-types"))]
491    #[deprecated]
492    pub fn AudioDeviceAddIOProc(
493        in_device: AudioDeviceID,
494        in_proc: AudioDeviceIOProc,
495        in_client_data: *mut c_void,
496    ) -> OSStatus;
497}
498
499extern "C-unwind" {
500    /// Unregisters the given AudioDeviceIOProc from the AudioDevice.
501    /// This routine has been deprecated in favor of AudioDeviceDestroyIOProcID().
502    ///
503    /// Parameter `inDevice`: The AudioDevice to unregister the IOProc from.
504    ///
505    /// Parameter `inProc`: The AudioDeviceIOProc to unregister.
506    ///
507    /// Returns: An OSStatus indicating success or failure.
508    #[cfg(all(feature = "AudioHardware", feature = "objc2-core-audio-types"))]
509    #[deprecated]
510    pub fn AudioDeviceRemoveIOProc(
511        in_device: AudioDeviceID,
512        in_proc: AudioDeviceIOProc,
513    ) -> OSStatus;
514}
515
516extern "C-unwind" {
517    /// Read some data from an AudioDevice starting at the given time.
518    ///
519    /// With the advent of aggregate devices, the need for AudioDeviceRead has gone
520    /// away. Consequently, this function is now deprecated.
521    ///
522    /// Parameter `inDevice`: The AudioDevice to read from.
523    ///
524    /// Parameter `inStartTime`: An AudioTimeStamp indicating the time from which to read the data. In
525    /// general, the valid range of time (in frames) is from the current time minus
526    /// the maximum IO buffer size to the current time minus the safety offset.
527    ///
528    /// Parameter `outData`: An AudioBufferList that must be the same size and shape as that returned by
529    /// kAudioDevicePropertyStreamConfiguration. Further, the AudioBufferList must
530    /// have been previously registered with the device via
531    /// kAudioDevicePropertyRegisterBufferList. On exit, the mDataSize fields will
532    /// be updated with the amount of data read.
533    ///
534    /// Returns: An OSStatus indicating success or failure.
535    /// kAudioHardwareUnsupportedOperationError will be returned if the AudioDevice does
536    /// not support direct reading.
537    #[cfg(all(feature = "AudioHardware", feature = "objc2-core-audio-types"))]
538    #[deprecated]
539    pub fn AudioDeviceRead(
540        in_device: AudioDeviceID,
541        in_start_time: NonNull<AudioTimeStamp>,
542        out_data: NonNull<AudioBufferList>,
543    ) -> OSStatus;
544}
545
546/// Retrieve information about the given property of an AudioDevice.
547///
548/// Note that the same functionality is provided by the functions
549/// AudioObjectHasProperty(), AudioObjectIsPropertySettable(), and
550/// AudioObjectGetPropertyDataSize().
551///
552/// Parameter `inDevice`: The AudioDevice to query.
553///
554/// Parameter `inChannel`: The channel of the property to query where 0 is the main channel.
555///
556/// Parameter `isInput`: Which section of the AudioDevice to query.
557///
558/// Parameter `inPropertyID`: The AudioDevicePropertyID of the property to query.
559///
560/// Parameter `outSize`: A pointer to a UInt32 that receives the size of the property data in bytes
561/// on exit. This can be NULL if the size information is not being requested.
562///
563/// Parameter `outWritable`: A pointer to a Boolean that receives indication of whether or not the given
564/// property can be set. This can be NULL if the writability is not being
565/// requested.
566///
567/// Returns: An OSStatus indicating success or failure.
568#[cfg(feature = "AudioHardware")]
569#[deprecated]
570#[inline]
571pub unsafe extern "C-unwind" fn AudioDeviceGetPropertyInfo(
572    in_device: AudioDeviceID,
573    in_channel: u32,
574    is_input: bool,
575    in_property_id: AudioDevicePropertyID,
576    out_size: *mut u32,
577    out_writable: *mut Boolean,
578) -> OSStatus {
579    extern "C-unwind" {
580        fn AudioDeviceGetPropertyInfo(
581            in_device: AudioDeviceID,
582            in_channel: u32,
583            is_input: Boolean,
584            in_property_id: AudioDevicePropertyID,
585            out_size: *mut u32,
586            out_writable: *mut Boolean,
587        ) -> OSStatus;
588    }
589    unsafe {
590        AudioDeviceGetPropertyInfo(
591            in_device,
592            in_channel,
593            is_input as _,
594            in_property_id,
595            out_size,
596            out_writable,
597        )
598    }
599}
600
601/// Queries an the AudioDevice object to get the data of the given property and
602/// places it in the provided buffer.
603///
604/// Note that the same functionality is provided by the function
605/// AudioObjectGetPropertyData().
606///
607/// Parameter `inDevice`: The AudioDevice to query.
608///
609/// Parameter `inChannel`: The channel of the property to query where 0 is the main channel.
610///
611/// Parameter `isInput`: Which section of the AudioDevice to query.
612///
613/// Parameter `inPropertyID`: The AudioDevicePropertyID of the property to query.
614///
615/// Parameter `ioPropertyDataSize`: A UInt32 which on entry indicates the size of the buffer pointed to by
616/// outData and on exit indicates how much of the buffer was used.
617///
618/// Parameter `outPropertyData`: The buffer into which the object will put the data for the given property.
619///
620/// Returns: An OSStatus indicating success or failure.
621#[cfg(feature = "AudioHardware")]
622#[deprecated]
623#[inline]
624pub unsafe extern "C-unwind" fn AudioDeviceGetProperty(
625    in_device: AudioDeviceID,
626    in_channel: u32,
627    is_input: bool,
628    in_property_id: AudioDevicePropertyID,
629    io_property_data_size: NonNull<u32>,
630    out_property_data: NonNull<c_void>,
631) -> OSStatus {
632    extern "C-unwind" {
633        fn AudioDeviceGetProperty(
634            in_device: AudioDeviceID,
635            in_channel: u32,
636            is_input: Boolean,
637            in_property_id: AudioDevicePropertyID,
638            io_property_data_size: NonNull<u32>,
639            out_property_data: NonNull<c_void>,
640        ) -> OSStatus;
641    }
642    unsafe {
643        AudioDeviceGetProperty(
644            in_device,
645            in_channel,
646            is_input as _,
647            in_property_id,
648            io_property_data_size,
649            out_property_data,
650        )
651    }
652}
653
654/// Tells the AudioDevice object to change the value of the given property using the
655/// provided data.
656///
657/// Note that the value of the property should not be considered changed until the
658/// HAL has called the listeners as many properties values are changed
659/// asynchronously. Also note that the same functionality is provided by the
660/// function AudioObjectSetPropertyData().
661///
662/// Parameter `inDevice`: The AudioDevice to change.
663///
664/// Parameter `inWhen`: A pointer to an AudioTimeStamp that says when to change the property's value
665/// relative to the device's time base. NULL means execute the change
666/// immediately.
667///
668/// Parameter `inChannel`: The channel of the property to change where 0 is the main channel.
669///
670/// Parameter `isInput`: Which section of the AudioDevice to change.
671///
672/// Parameter `inPropertyID`: The AudioDevicePropertyID of the property to change.
673///
674/// Parameter `inPropertyDataSize`: A UInt32 indicating the size of the buffer pointed to by inData.
675///
676/// Parameter `inPropertyData`: The buffer containing the data to be used to change the property's value.
677///
678/// Returns: An OSStatus indicating success or failure.
679#[cfg(all(feature = "AudioHardware", feature = "objc2-core-audio-types"))]
680#[deprecated]
681#[inline]
682pub unsafe extern "C-unwind" fn AudioDeviceSetProperty(
683    in_device: AudioDeviceID,
684    in_when: *const AudioTimeStamp,
685    in_channel: u32,
686    is_input: bool,
687    in_property_id: AudioDevicePropertyID,
688    in_property_data_size: u32,
689    in_property_data: NonNull<c_void>,
690) -> OSStatus {
691    extern "C-unwind" {
692        fn AudioDeviceSetProperty(
693            in_device: AudioDeviceID,
694            in_when: *const AudioTimeStamp,
695            in_channel: u32,
696            is_input: Boolean,
697            in_property_id: AudioDevicePropertyID,
698            in_property_data_size: u32,
699            in_property_data: NonNull<c_void>,
700        ) -> OSStatus;
701    }
702    unsafe {
703        AudioDeviceSetProperty(
704            in_device,
705            in_when,
706            in_channel,
707            is_input as _,
708            in_property_id,
709            in_property_data_size,
710            in_property_data,
711        )
712    }
713}
714
715/// Registers the given AudioDevicePropertyListenerProc to receive notifications
716/// when the given property changes.
717///
718/// Note that the same functionality is provided by AudioObjectAddPropertyListener
719/// in conjunction with AudioObjectPropertyListenerProc.
720///
721/// Parameter `inDevice`: The AudioDevice with whom to register the listener.
722///
723/// Parameter `inChannel`: The channel of the property to listen to.
724///
725/// Parameter `isInput`: Which section of the AudioDevice to listen to.
726///
727/// Parameter `inPropertyID`: The AudioDevicePropertyID of the property to listen to.
728///
729/// Parameter `inProc`: AudioDevicePropertyListenerProc to call.
730///
731/// Parameter `inClientData`: A pointer to client data that is passed to the listener when it is called.
732///
733/// Returns: An OSStatus indicating success or failure.
734#[cfg(feature = "AudioHardware")]
735#[deprecated]
736#[inline]
737pub unsafe extern "C-unwind" fn AudioDeviceAddPropertyListener(
738    in_device: AudioDeviceID,
739    in_channel: u32,
740    is_input: bool,
741    in_property_id: AudioDevicePropertyID,
742    in_proc: AudioDevicePropertyListenerProc,
743    in_client_data: *mut c_void,
744) -> OSStatus {
745    extern "C-unwind" {
746        fn AudioDeviceAddPropertyListener(
747            in_device: AudioDeviceID,
748            in_channel: u32,
749            is_input: Boolean,
750            in_property_id: AudioDevicePropertyID,
751            in_proc: AudioDevicePropertyListenerProc,
752            in_client_data: *mut c_void,
753        ) -> OSStatus;
754    }
755    unsafe {
756        AudioDeviceAddPropertyListener(
757            in_device,
758            in_channel,
759            is_input as _,
760            in_property_id,
761            in_proc,
762            in_client_data,
763        )
764    }
765}
766
767/// Unregisters the given AudioDevicePropertyListenerProc from receiving
768/// notifications when the given property changes.
769///
770/// Note that the same functionality is provided by
771/// AudioObjectRemovePropertyListener in conjunction with
772/// AudioObjectPropertyListenerProc.
773///
774/// Parameter `inDevice`: The AudioDevice with whom to unregister the listener.
775///
776/// Parameter `inChannel`: The channel of the property to unregister from.
777///
778/// Parameter `isInput`: Which section of the AudioDevice to unregister from.
779///
780/// Parameter `inPropertyID`: The AudioDevicePropertyID of the property to stop listening to.
781///
782/// Parameter `inProc`: AudioDevicePropertyListenerProc to unregister.
783///
784/// Returns: An OSStatus indicating success or failure.
785#[cfg(feature = "AudioHardware")]
786#[deprecated]
787#[inline]
788pub unsafe extern "C-unwind" fn AudioDeviceRemovePropertyListener(
789    in_device: AudioDeviceID,
790    in_channel: u32,
791    is_input: bool,
792    in_property_id: AudioDevicePropertyID,
793    in_proc: AudioDevicePropertyListenerProc,
794) -> OSStatus {
795    extern "C-unwind" {
796        fn AudioDeviceRemovePropertyListener(
797            in_device: AudioDeviceID,
798            in_channel: u32,
799            is_input: Boolean,
800            in_property_id: AudioDevicePropertyID,
801            in_proc: AudioDevicePropertyListenerProc,
802        ) -> OSStatus;
803    }
804    unsafe {
805        AudioDeviceRemovePropertyListener(
806            in_device,
807            in_channel,
808            is_input as _,
809            in_property_id,
810            in_proc,
811        )
812    }
813}
814
815/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudioaggregatedevicepropertymastersubdevice?language=objc)
816#[cfg(feature = "AudioHardware")]
817#[deprecated]
818pub const kAudioAggregateDevicePropertyMasterSubDevice: AudioObjectPropertySelector =
819    kAudioAggregateDevicePropertyMainSubDevice;
820
821/// AudioStream is the base class for all objects that represent a stream of data on
822/// an audio device.
823///
824/// AudioStream is a subclass of AudioObject and can contain AudioControls.
825///
826/// See also [Apple's documentation](https://developer.apple.com/documentation/coreaudio/audiostreamid?language=objc)
827#[cfg(feature = "AudioHardware")]
828pub type AudioStreamID = AudioObjectID;
829
830/// Clients register an AudioStreamPropertyListenerProc with the AudioStream object
831/// in order to receive notifications when the properties of the object change.
832///
833/// Note that the same functionality is provided by AudioObjectPropertyListenerProc.
834///
835/// Parameter `inStream`: The AudioStream whose property has changed.
836///
837/// Parameter `inChannel`: The channel of the property that changed where 0 is the main channel.
838///
839/// Parameter `inPropertyID`: The AudioDevicePropertyID of the property that changed.
840///
841/// Parameter `inClientData`: A pointer to client data established when the listener proc was registered
842/// with the object.
843///
844/// Returns: The return value is currently unused and should always be 0.
845///
846/// See also [Apple's documentation](https://developer.apple.com/documentation/coreaudio/audiostreampropertylistenerproc?language=objc)
847#[cfg(feature = "AudioHardware")]
848pub type AudioStreamPropertyListenerProc = Option<
849    unsafe extern "C-unwind" fn(AudioStreamID, u32, AudioDevicePropertyID, *mut c_void) -> OSStatus,
850>;
851
852/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiostreamunknown?language=objc)
853#[cfg(feature = "AudioHardware")]
854pub const kAudioStreamUnknown: AudioObjectID = kAudioObjectUnknown;
855
856/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiostreampropertyowningdevice?language=objc)
857#[cfg(feature = "AudioHardware")]
858pub const kAudioStreamPropertyOwningDevice: AudioObjectPropertySelector = kAudioObjectPropertyOwner;
859/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiostreampropertyphysicalformats?language=objc)
860#[cfg(feature = "AudioHardware")]
861pub const kAudioStreamPropertyPhysicalFormats: AudioObjectPropertySelector = 0x70667423;
862/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiostreampropertyphysicalformatsupported?language=objc)
863#[cfg(feature = "AudioHardware")]
864pub const kAudioStreamPropertyPhysicalFormatSupported: AudioObjectPropertySelector = 0x7066743f;
865/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiostreampropertyphysicalformatmatch?language=objc)
866#[cfg(feature = "AudioHardware")]
867pub const kAudioStreamPropertyPhysicalFormatMatch: AudioObjectPropertySelector = 0x7066746d;
868
869extern "C-unwind" {
870    /// Retrieve information about the given property of an AudioStream.
871    ///
872    /// Parameter `inStream`: The AudioStream to query.
873    ///
874    /// Parameter `inChannel`: The channel of the property to query where 0 is the main channel.
875    ///
876    /// Parameter `inPropertyID`: The AudioDevicePropertyID of the property to query.
877    ///
878    /// Parameter `outSize`: A pointer to a UInt32 that receives the size of the property data in bytes
879    /// on exit. This can be NULL if the size information is not being requested.
880    ///
881    /// Parameter `outWritable`: A pointer to a Boolean that receives indication of whether or not the given
882    /// property can be set. This can be NULL if the writability is not being
883    /// requested.
884    ///
885    /// Returns: An OSStatus indicating success or failure.
886    #[cfg(feature = "AudioHardware")]
887    #[deprecated]
888    pub fn AudioStreamGetPropertyInfo(
889        in_stream: AudioStreamID,
890        in_channel: u32,
891        in_property_id: AudioDevicePropertyID,
892        out_size: *mut u32,
893        out_writable: *mut Boolean,
894    ) -> OSStatus;
895}
896
897extern "C-unwind" {
898    /// Queries an the AudioStream object to get the data of the given property and
899    /// places it in the provided buffer.
900    ///
901    /// Note that the same functionality is provided by the function
902    /// AudioObjectGetPropertyData().
903    ///
904    /// Parameter `inStream`: The AudioStream to query.
905    ///
906    /// Parameter `inChannel`: The channel of the property to query where 0 is the main channel.
907    ///
908    /// Parameter `inPropertyID`: The AudioDevicePropertyID of the property to query.
909    ///
910    /// Parameter `ioPropertyDataSize`: A UInt32 which on entry indicates the size of the buffer pointed to by
911    /// outData and on exit indicates how much of the buffer was used.
912    ///
913    /// Parameter `outPropertyData`: The buffer into which the object will put the data for the given property.
914    ///
915    /// Returns: An OSStatus indicating success or failure.
916    #[cfg(feature = "AudioHardware")]
917    #[deprecated]
918    pub fn AudioStreamGetProperty(
919        in_stream: AudioStreamID,
920        in_channel: u32,
921        in_property_id: AudioDevicePropertyID,
922        io_property_data_size: NonNull<u32>,
923        out_property_data: NonNull<c_void>,
924    ) -> OSStatus;
925}
926
927extern "C-unwind" {
928    /// Tells the AudioStream object to change the value of the given property using the
929    /// provided data.
930    ///
931    /// Note that the value of the property should not be considered changed until the
932    /// HAL has called the listeners as many properties values are changed
933    /// asynchronously. Also note that the same functionality is provided by the
934    /// function AudioObjectSetPropertyData().
935    ///
936    /// Parameter `inStream`: The AudioStream to change.
937    ///
938    /// Parameter `inWhen`: A pointer to an AudioTimeStamp that says when to change the property's value
939    /// relative to the device's time base. NULL means execute the change
940    /// immediately.
941    ///
942    /// Parameter `inChannel`: The channel of the property to change where 0 is the main channel.
943    ///
944    /// Parameter `inPropertyID`: The AudioDevicePropertyID of the property to change.
945    ///
946    /// Parameter `inPropertyDataSize`: A UInt32 indicating the size of the buffer pointed to by inData.
947    ///
948    /// Parameter `inPropertyData`: The buffer containing the data to be used to change the property's value.
949    ///
950    /// Returns: An OSStatus indicating success or failure.
951    #[cfg(all(feature = "AudioHardware", feature = "objc2-core-audio-types"))]
952    #[deprecated]
953    pub fn AudioStreamSetProperty(
954        in_stream: AudioStreamID,
955        in_when: *const AudioTimeStamp,
956        in_channel: u32,
957        in_property_id: AudioDevicePropertyID,
958        in_property_data_size: u32,
959        in_property_data: NonNull<c_void>,
960    ) -> OSStatus;
961}
962
963extern "C-unwind" {
964    /// Registers the given AudioStreamPropertyListenerProc to receive notifications
965    /// when the given property changes.
966    ///
967    /// Note that the same functionality is provided by AudioObjectAddPropertyListener
968    /// in conjunction with AudioObjectPropertyListenerProc.
969    ///
970    /// Parameter `inStream`: The AudioStream with whom to register the listener.
971    ///
972    /// Parameter `inChannel`: The channel of the property to listen to.
973    ///
974    /// Parameter `inPropertyID`: The AudioDevicePropertyID of the property to listen to.
975    ///
976    /// Parameter `inProc`: AudioStreamPropertyListenerProc to call.
977    ///
978    /// Parameter `inClientData`: A pointer to client data that is passed to the listener when it is called.
979    ///
980    /// Returns: An OSStatus indicating success or failure.
981    #[cfg(feature = "AudioHardware")]
982    #[deprecated]
983    pub fn AudioStreamAddPropertyListener(
984        in_stream: AudioStreamID,
985        in_channel: u32,
986        in_property_id: AudioDevicePropertyID,
987        in_proc: AudioStreamPropertyListenerProc,
988        in_client_data: *mut c_void,
989    ) -> OSStatus;
990}
991
992extern "C-unwind" {
993    /// Unregisters the given AudioStreamPropertyListenerProc from receiving
994    /// notifications when the given property changes.
995    ///
996    /// Note that the same functionality is provided by
997    /// AudioObjectRemovePropertyListener in conjunction with
998    /// AudioObjectPropertyListenerProc.
999    ///
1000    /// Parameter `inStream`: The AudioStream with whom to unregister the listener.
1001    ///
1002    /// Parameter `inChannel`: The channel of the property to unregister from.
1003    ///
1004    /// Parameter `inPropertyID`: The AudioDevicePropertyID of the property to stop listening to.
1005    ///
1006    /// Parameter `inProc`: AudioStreamPropertyListenerProc to unregister.
1007    ///
1008    /// Returns: An OSStatus indicating success or failure.
1009    #[cfg(feature = "AudioHardware")]
1010    #[deprecated]
1011    pub fn AudioStreamRemovePropertyListener(
1012        in_stream: AudioStreamID,
1013        in_channel: u32,
1014        in_property_id: AudioDevicePropertyID,
1015        in_proc: AudioStreamPropertyListenerProc,
1016    ) -> OSStatus;
1017}
1018
1019/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiobootchimevolumecontrolclassid?language=objc)
1020#[cfg(feature = "AudioHardware")]
1021pub const kAudioBootChimeVolumeControlClassID: AudioClassID = 0x7072616d;
1022
1023/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudiocontrolpropertyvariant?language=objc)
1024#[cfg(feature = "AudioHardware")]
1025pub const kAudioControlPropertyVariant: AudioObjectPropertySelector = 0x63766172;
1026
1027/// [Apple's documentation](https://developer.apple.com/documentation/coreaudio/kaudioclocksourcecontrolpropertyitemkind?language=objc)
1028#[cfg(feature = "AudioHardware")]
1029pub const kAudioClockSourceControlPropertyItemKind: AudioObjectPropertySelector =
1030    kAudioSelectorControlPropertyItemKind;