Functions
Registers the given AudioDeviceIOProc with the AudioDevice.
extern OSStatus AudioDeviceAddIOProc (
AudioDeviceID inDevice,
AudioDeviceIOProc inProc,
void* inClientData
) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER;
Discussion
A client may have multiple IOProcs for a given device, but the device is free to
only accept as many as it can handle. Note that it is not recommended for
clients to have more than a single IOProc registered at a time as this can be
wasteful of system resources. Rather, it is recommended that the client do any
necessary mixing itself so that only one IOProc is necessary.
Parameter Descriptions
- inDevice
- The AudioDevice to register the IOProc with.
- inProc
- The AudioDeviceIOProc to register.
- inClientData
- A pointer to client data that is passed back to the IOProc when it is
called.
- function result
- An OSStatus indicating success or failure.
Registers the given AudioDevicePropertyListenerProc to receive notifications
when the given property changes.
extern OSStatus AudioDeviceAddPropertyListener (
AudioDeviceID inDevice,
UInt32 inChannel,
Boolean isInput,
AudioDevicePropertyID inPropertyID,
AudioDevicePropertyListenerProc inProc,
void* inClientData
) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER;
Discussion
Note that the same functionality is provided by AudioObjectAddPropertyListener
in conjunction with AudioObjectPropertyListenerProc.
Parameter Descriptions
- inDevice
- The AudioDevice with whom to register the listener.
- inChannel
- The channel of the property to listen to.
- isInput
- Which section of the AudioDevice to listen to.
- inPropertyID
- The AudioDevicePropertyID of the property to listen to.
- inProc
- AudioDevicePropertyListenerProc to call.
- inClientData
- A pointer to client data that is passed to the listener when it is called.
- function result
- An OSStatus indicating success or failure.
Retrieves the current time from an AudioDevice. Note that the device has to be
running.
extern OSStatus AudioDeviceGetCurrentTime (
AudioDeviceID inDevice,
AudioTimeStamp* outTime
) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER;
Parameter Descriptions
- inDevice
- The AudioDevice to from which to get the time.
- outTime
- An AudioTimeStamp into which the current time is put.
- function result
- An OSStatus indicating success or failure. kAudioHardwareNotRunningError will be
returned if the AudioDevice isn't running.
Query an AudioDevice to get a time equal to or later than the given time that is
the best time to start IO.
extern OSStatus AudioDeviceGetNearestStartTime (
AudioDeviceID inDevice,
AudioTimeStamp* ioRequestedStartTime,
UInt32 inFlags
) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
Discussion
The time that is returned is dictated by the constraints of the device and the
system. For instance, the driver of a device that provides both audio and video
data may only allow start times that coincide with the edge of a video frame.
Also, if the device already has one or more active IOProcs, the start time will
be shifted to the beginning of the next IO cycle so as not to cause
discontinuities in the existing IOProcs. Another reason the start time may shift
is to allow for aligning the buffer accesses in an optimal fashion. Note that
the device must be running to use this function.
Parameter Descriptions
- inDevice
- The AudioDevice to query.
- ioRequestedStartTime
- A pointer to an AudioTimeStamp that, on entry, is the requested start time.
On exit, it will have the a time equal to or later than the requested time,
as dictated by the device's constraints.
- inFlags
- A UInt32 containing flags that modify how this function behaves.
- function result
- An OSStatus indicating success or failure. kAudioHardwareNotRunningError will be
returned if the AudioDevice isn't running.
kAudioHardwareUnsupportedOperationError will be returned if the AudioDevice does
not support starting at a specific time.
Queries an the AudioDevice object to get the data of the given property and
places it in the provided buffer.
extern OSStatus AudioDeviceGetProperty (
AudioDeviceID inDevice,
UInt32 inChannel,
Boolean isInput,
AudioDevicePropertyID inPropertyID,
UInt32* ioPropertyDataSize,
void* outPropertyData
) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER;
Discussion
Note that the same functionality is provided by the function
AudioObjectGetPropertyData().
Parameter Descriptions
- inDevice
- The AudioDevice to query.
- inChannel
- The channel of the property to query where 0 is the master channel.
- isInput
- Which section of the AudioDevice to query.
- inPropertyID
- The AudioDevicePropertyID of the property to query.
- ioPropertyDataSize
- A UInt32 which on entry indicates the size of the buffer pointed to by
outData and on exit indicates how much of the buffer was used.
- outPropertyData
- The buffer into which the object will put the data for the given property.
- function result
- An OSStatus indicating success or failure.
Retrieve information about the given property of an AudioDevice.
extern OSStatus AudioDeviceGetPropertyInfo (
AudioDeviceID inDevice,
UInt32 inChannel,
Boolean isInput,
AudioDevicePropertyID inPropertyID,
UInt32* outSize,
Boolean* outWritable
) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER;
Discussion
Note that the same functionality is provided by the functions
AudioObjectHasProperty(), AudioObjectIsPropertySettable(), and
AudioObjectGetPropertyDataSize().
Parameter Descriptions
- inDevice
- The AudioDevice to query.
- inChannel
- The channel of the property to query where 0 is the master channel.
- isInput
- Which section of the AudioDevice to query.
- inPropertyID
- The AudioDevicePropertyID of the property to query.
- outSize
- A pointer to a UInt32 that receives the size of the property data in bytes
on exit. This can be NULL if the size information is not being requested.
- outWritable
- A pointer to a Boolean that receives indication of whether or not the given
property can be set. This can be NULL if the writability is not being
requested.
- function result
- An OSStatus indicating success or failure.
Read some data from an AudioDevice starting at the given time.
extern OSStatus AudioDeviceRead (
AudioDeviceID inDevice,
const AudioTimeStamp* inStartTime,
AudioBufferList* outData
) AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER;
Discussion
With the advent of aggregate devices, the need for AudioDeviceRead has gone
away. Consequently, this function is a good candidate for deprecation some day.
Parameter Descriptions
- inDevice
- The AudioDevice to read from.
- inStartTime
- An AudioTimeStamp indicating the time from which to read the data. In
general, the valid range of time (in frames) is from the current time minus
the maximum IO buffer size to the current time minus the safety offset.
- outData
- An AudioBufferList that must be the same size and shape as that returned by
kAudioDevicePropertyStreamConfiguration. Further, the AudioBufferList must
have been previously registered with the device via
kAudioDevicePropertyRegisterBufferList. On exit, the mDataSize fields will
be updated with the amount of data read.
- function result
- An OSStatus indicating success or failure.
kAudioHardwareUnsupportedOperationError will be returned if the AudioDevice does
not support direct reading.
Unregisters the given AudioDeviceIOProc from the AudioDevice.
extern OSStatus AudioDeviceRemoveIOProc (
AudioDeviceID inDevice,
AudioDeviceIOProc inProc
) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER;
Parameter Descriptions
- inDevice
- The AudioDevice to unregister the IOProc from.
- inProc
- The AudioDeviceIOProc to unregister.
- function result
- An OSStatus indicating success or failure.
Unregisters the given AudioDevicePropertyListenerProc from receiving
notifications when the given property changes.
extern OSStatus AudioDeviceRemovePropertyListener (
AudioDeviceID inDevice,
UInt32 inChannel,
Boolean isInput,
AudioDevicePropertyID inPropertyID,
AudioDevicePropertyListenerProc inProc
) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER;
Discussion
Note that the same functionality is provided by
AudioObjectRemovePropertyListener in conjunction with
AudioObjectPropertyListenerProc.
Parameter Descriptions
- inDevice
- The AudioDevice with whom to unregister the listener.
- inChannel
- The channel of the property to unregister from.
- isInput
- Which section of the AudioDevice to unregister from.
- inPropertyID
- The AudioDevicePropertyID of the property to stop listening to.
- inProc
- AudioDevicePropertyListenerProc to unregister.
- function result
- An OSStatus indicating success or failure.
Tells the AudioDevice object to change the value of the given property using the
provided data.
extern OSStatus AudioDeviceSetProperty (
AudioDeviceID inDevice,
const AudioTimeStamp* inWhen,
UInt32 inChannel,
Boolean isInput,
AudioDevicePropertyID inPropertyID,
UInt32 inPropertyDataSize,
const void* inPropertyData
) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER;
Discussion
Note that the value of the property should not be considered changed until the
HAL has called the listeners as many properties values are changed
asynchronously. Also note that the same functionality is provided by the
function AudioObjectGetPropertyData().
Parameter Descriptions
- inDevice
- The AudioDevice to change.
- inWhen
- A pointer to an AudioTimeStamp that says when to change the property's value
relative to the device's time base. NULL means execute the change
immediately.
- inChannel
- The channel of the property to change where 0 is the master channel.
- isInput
- Which section of the AudioDevice to change.
- inPropertyID
- The AudioDevicePropertyID of the property to change.
- inPropertyDataSize
- A UInt32 indicating the size of the buffer pointed to by inData.
- inPropertyData
- The buffer containing the data to be used to change the property's value.
- function result
- An OSStatus indicating success or failure.
Starts IO for the given AudioDeviceIOProc.
extern OSStatus AudioDeviceStart (
AudioDeviceID inDevice,
AudioDeviceIOProc inProc
) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER;
Parameter Descriptions
- inDevice
- The AudioDevice to start the IOProc on.
- inProc
- The AudioDeviceIOProc to start. Note that this can be NULL, which starts the
hardware regardless of whether or not there are any IOProcs registered. This
is necessary if any of the AudioDevice's timing services are to be used. A
balancing call to AudioDeviceStop with a NULL IOProc is required to stop the
hardware.
- function result
- An OSStatus indicating success or failure.
Starts IO for the given AudioDeviceIOProc and aligns the IO cycle of the
AudioDevice with the given time.
extern OSStatus AudioDeviceStartAtTime (
AudioDeviceID inDevice,
AudioDeviceIOProc inProc,
AudioTimeStamp* ioRequestedStartTime,
UInt32 inFlags
) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
Parameter Descriptions
- inDevice
- The AudioDevice to start the IOProc on.
- inProc
- The AudioDeviceIOProc to start. Note that this can be NULL, which starts the
hardware regardless of whether or not there are any IOProcs registered.
- ioRequestedStartTime
- A pointer to an AudioTimeStamp that, on entry, is the requested time to
start the IOProc. On exit, it will be the actual time the IOProc will start.
- inFlags
- A UInt32 containing flags that modify how this function behaves.
- function result
- An OSStatus indicating success or failure.
kAudioHardwareUnsupportedOperationError will be returned if the AudioDevice does
not support starting at a specific time and inProc and ioRequestedStartTime are
not NULL.
Stops IO for the given AudioDeviceIOProc.
extern OSStatus AudioDeviceStop (
AudioDeviceID inDevice,
AudioDeviceIOProc inProc
) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER;
Parameter Descriptions
- inDevice
- The AudioDevice to stop the IOProc on.
- inProc
- The AudioDeviceIOProc to stop.
- function result
- An OSStatus indicating success or failure.
Translates the time in the AudioDevice's time base from one representation to
another. Note that the device has to be running
extern OSStatus AudioDeviceTranslateTime (
AudioDeviceID inDevice,
const AudioTimeStamp* inTime,
AudioTimeStamp* outTime
) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER;
Parameter Descriptions
- inDevice
- The AudioDevice whose time base governs the translation.
- inTime
- An AudioTimeStamp containing the time to be translated.
- outTime
- An AudioTimeStamp into which the translated time is put. On entry, the
mFlags field specifies which representations to translate the input time
into. Because not every device supports all time representations, on exit,
the mFlags field will indicate which translations were actually done.
- function result
- An OSStatus indicating success or failure. kAudioHardwareNotRunningError will be
returned if the AudioDevice isn't running.
Registers the given AudioHardwarePropertyListenerProc to receive notifications
when the given property changes.
extern OSStatus AudioHardwareAddPropertyListener (
AudioHardwarePropertyID inPropertyID,
AudioHardwarePropertyListenerProc inProc,
void* inClientData
) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER;
Discussion
Note that the same functionality is provided by AudioObjectAddPropertyListener
in conjunction with AudioObjectPropertyListenerProc.
Parameter Descriptions
- inPropertyID
- The AudioHardwarePropertyID of the property to listen to.
- inProc
- AudioHardwarePropertyListenerProc to call.
- inClientData
- A pointer to client data that is passed to the listener when it is called.
- function result
- An OSStatus indicating success or failure.
Add the given CFRunLoopSource to the the HAL's notification CFRunLoop.
extern OSStatus AudioHardwareAddRunLoopSource (
CFRunLoopSourceRef inRunLoopSource
) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
Discussion
The CFRunLoop the HAL uses for notifications is specified by
kAudioHardwarePropertyRunLoop. If kAudioHardwarePropertyRunLoop changes,
CFRunLoopSources added with this function will automatically be transferred to
the new CFRunLoop.
Parameter Descriptions
- inRunLoopSource
- The CFRunLoopSource to add.
- function result
- An OSStatus indicating success or failure.
Queries an the AudioSystemObject to get the data of the given property and
places it in the provided buffer.
extern OSStatus AudioHardwareGetProperty (
AudioHardwarePropertyID inPropertyID,
UInt32* ioPropertyDataSize,
void* outPropertyData
) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER;
Discussion
Note that the same functionality is provided by the function
AudioObjectGetPropertyData().
Parameter Descriptions
- inPropertyID
- The AudioHardwarePropertyID of the property to query.
- ioDataSize
- A UInt32 which on entry indicates the size of the buffer pointed to by
outData and on exit indicates how much of the buffer was used.
- outData
- The buffer into which the AudioSystemObject will put the data for the given
property.
- function result
- An OSStatus indicating success or failure.
Retrieve information about the given property.
extern OSStatus AudioHardwareGetPropertyInfo (
AudioHardwarePropertyID inPropertyID,
UInt32* outSize,
Boolean* outWritable
) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER;
Discussion
Note that the same functionality is provided by the functions
AudioObjectHasProperty(), AudioObjectIsPropertySettable(), and
AudioObjectGetPropertyDataSize().
Parameter Descriptions
- inPropertyID
- The AudioHardwarePropertyID of the property to query.
- outSize
- A pointer to a UInt32 that receives the size of the property data in bytes
on exit. This can be NULL if the size information is not being requested.
- outWritable
- A pointer to a Boolean that receives indication of whether or not the given
property can be set. This can be NULL if the writability is not being
requested.
- function result
- An OSStatus indicating success or failure.
Unregisters the given AudioHardwarePropertyListenerProc from receive
notifications when the given property changes.
extern OSStatus AudioHardwareRemovePropertyListener (
AudioHardwarePropertyID inPropertyID,
AudioHardwarePropertyListenerProc inProc
) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER;
Discussion
Note that the same functionality is provided by
AudioObjectRemovePropertyListener in conjunction with
AudioObjectPropertyListenerProc.
Parameter Descriptions
- inPropertyID
- The AudioHardwarePropertyID of the property to stop listening to.
- inProc
- AudioHardwarePropertyListenerProc to unregister.
- function result
- An OSStatus indicating success or failure.
Remove the given CFRunLoopSource from the the HAL's notification CFRunLoop.
extern OSStatus AudioHardwareRemoveRunLoopSource (
CFRunLoopSourceRef inRunLoopSource
) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
Discussion
The CFRunLoop the HAL uses for notifications is specified by
kAudioHardwarePropertyRunLoop.
Parameter Descriptions
- inRunLoopSource
- The CFRunLoopSource to remove.
- function result
- An OSStatus indicating success or failure.
Tells the AudioSystemObject to change the value of the given property using the
provided data.
extern OSStatus AudioHardwareSetProperty (
AudioHardwarePropertyID inPropertyID,
UInt32 inPropertyDataSize,
const void* inPropertyData
) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER;
Discussion
Note that the value of the property should not be considered changed until the
HAL has called the listeners as many properties values are changed
asynchronously. Also note that the same functionality is provided by the
function AudioObjectGetPropertyData().
Parameter Descriptions
- inPropertyID
- The AudioHardwarePropertyID of the property to change.
- inDataSize
- A UInt32 indicating the size of the buffer pointed to by inData.
- inData
- The buffer containing the data to be used to change the property's value.
- function result
- An OSStatus indicating success or failure.
When this routine is called, all IO on all devices within a process will be
terminated and all resources capable of being released will be released. This
routine essentially returns the HAL to it's uninitialized state.
extern OSStatus AudioHardwareUnload (void) AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER;
- function result
- An OSStatus indicating success or failure.
Registers the given AudioObjectPropertyListenerProc to receive notifications
when the given properties change.
extern OSStatus AudioObjectAddPropertyListener (
AudioObjectID inObjectID,
const AudioObjectPropertyAddress* inAddress,
AudioObjectPropertyListenerProc inListener,
void* inClientData
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
Parameter Descriptions
- inObjectID
- The AudioObject to register the listener with.
- inAddress
- The AudioObjectPropertyAddresses indicating which property the listener
should be notified about.
- inListener
- The AudioObjectPropertyListenerProc to call.
- inClientData
- A pointer to client data that is passed to the listener when it is called.
- function result
- An OSStatus indicating success or failure.
Queries an AudioObject to get the data of the given property and places it in
the provided buffer.
extern OSStatus AudioObjectGetPropertyData (
AudioObjectID inObjectID,
const AudioObjectPropertyAddress* inAddress,
UInt32 inQualifierDataSize,
const void* inQualifierData,
UInt32* ioDataSize,
void* outData
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
Parameter Descriptions
- inObjectID
- The AudioObject to query.
- inAddress
- An AudioObjectPropertyAddress indicating which property is being queried.
- inQualifierDataSize
- A UInt32 indicating the size of the buffer pointed to by inQualifierData.
Note that not all properties require qualification, in which case this
value will be 0.
- inQualifierData,
- A buffer of data to be used in determining the data of the property being
queried. Note that not all properties require qualification, in which case
this value will be NULL.
- ioDataSize
- A UInt32 which on entry indicates the size of the buffer pointed to by
outData and on exit indicates how much of the buffer was used.
- outData
- The buffer into which the AudioObject will put the data for the given
property.
- function result
- An OSStatus indicating success or failure.
Queries an AudioObject to find the size of the data for the given property.
extern OSStatus AudioObjectGetPropertyDataSize (
AudioObjectID inObjectID,
const AudioObjectPropertyAddress* inAddress,
UInt32 inQualifierDataSize,
const void* inQualifierData,
UInt32* outDataSize
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
Parameter Descriptions
- inObjectID
- The AudioObject to query.
- inAddress
- An AudioObjectPropertyAddress indicating which property is being queried.
- inQualifierDataSize
- A UInt32 indicating the size of the buffer pointed to by inQualifierData.
Note that not all properties require qualification, in which case this
value will be 0.
- inQualifierData,
- A buffer of data to be used in determining the data of the property being
queried. Note that not all properties require qualification, in which case
this value will be NULL.
- outDataSize
- A UInt32 indicating how many bytes the data for the given property occupies.
- function result
- An OSStatus indicating success or failure.
Queries an AudioObject about whether or not it has the given property.
extern Boolean AudioObjectHasProperty (
AudioObjectID inObjectID,
const AudioObjectPropertyAddress* inAddress
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
Parameter Descriptions
- inObjectID
- The AudioObject to query.
- inAddress
- An AudioObjectPropertyAddress indicating which property is being queried.
- function result
- A Boolean indicating whether or not the AudioObject has the given property.
Queries an AudioObject about whether or not the given property can be set using
AudioObjectSetPropertyData.
extern OSStatus AudioObjectIsPropertySettable (
AudioObjectID inObjectID,
const AudioObjectPropertyAddress* inAddress,
Boolean* outIsSettable
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
Parameter Descriptions
- inObjectID
- The AudioObject to query.
- inAddress
- An AudioObjectPropertyAddress indicating which property is being queried.
- outIsSettable
- A Boolean indicating whether or not the property can be set.
- function result
- An OSStatus indicating success or failure.
Unregisters the given AudioObjectPropertyListenerProc from receiving
notifications when the given properties change.
extern OSStatus AudioObjectRemovePropertyListener (
AudioObjectID inObjectID,
const AudioObjectPropertyAddress* inAddress,
AudioObjectPropertyListenerProc inListener,
void* inClientData
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
Parameter Descriptions
- inObjectID
- The AudioObject to unregister the listener from.
- inNumberAddresses
- The number of elements in the inAddresses array.
- inAddresses
- The AudioObjectPropertyAddress indicating which property the listener should
be removed from.
- inListener
- The AudioObjectPropertyListenerProc being removed.
- inClientData
- A pointer to client data that is passed to the listener when it is called.
- function result
- An OSStatus indicating success or failure.
Tells an AudioObject to change the value of the given property using the
provided data.
extern OSStatus AudioObjectSetPropertyData (
AudioObjectID inObjectID,
const AudioObjectPropertyAddress* inAddress,
UInt32 inQualifierDataSize,
const void* inQualifierData,
UInt32 inDataSize,
const void* inData
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
Discussion
Note that the value of the property should not be considered changed until the
HAL has called the listeners as many properties values are changed
asynchronously.
Parameter Descriptions
- inObjectID
- The AudioObject to change.
- inAddress
- An AudioObjectPropertyAddress indicating which property is being changed.
- inQualifierDataSize
- A UInt32 indicating the size of the buffer pointed to by inQualifierData.
Note that not all properties require qualification, in which case this
value will be 0.
- inQualifierData,
- A buffer of data to be used in determining the data of the property being
queried. Note that not all properties require qualification, in which case
this value will be NULL.
- inDataSize
- A UInt32 indicating the size of the buffer pointed to by inData.
- inData
- The buffer containing the data to be used to change the property's value.
- function result
- An OSStatus indicating success or failure.
Prints to standard out a textural description of the AudioObject.
extern void AudioObjectShow (
AudioObjectID inObjectID
) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
Parameter Descriptions
- inObjectID
- The AudioObject to show.
Registers the given AudioStreamPropertyListenerProc to receive notifications
when the given property changes.
extern OSStatus AudioStreamAddPropertyListener (
AudioStreamID inStream,
UInt32 inChannel,
AudioDevicePropertyID inPropertyID,
AudioStreamPropertyListenerProc inProc,
void* inClientData
) AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER;
Discussion
Note that the same functionality is provided by AudioObjectAddPropertyListener
in conjunction with AudioObjectPropertyListenerProc.
Parameter Descriptions
- inStream
- The AudioStream with whom to register the listener.
- inChannel
- The channel of the property to listen to.
- inPropertyID
- The AudioDevicePropertyID of the property to listen to.
- inProc
- AudioStreamPropertyListenerProc to call.
- inClientData
- A pointer to client data that is passed to the listener when it is called.
- function result
- An OSStatus indicating success or failure.
Queries an the AudioStream object to get the data of the given property and
places it in the provided buffer.
extern OSStatus AudioStreamGetProperty (
AudioStreamID inStream,
UInt32 inChannel,
AudioDevicePropertyID inPropertyID,
UInt32* ioPropertyDataSize,
void* outPropertyData
) AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER;
Discussion
Note that the same functionality is provided by the function
AudioObjectGetPropertyData().
Parameter Descriptions
- inStream
- The AudioStream to query.
- inChannel
- The channel of the property to query where 0 is the master channel.
- inPropertyID
- The AudioDevicePropertyID of the property to query.
- ioPropertyDataSize
- A UInt32 which on entry indicates the size of the buffer pointed to by
outData and on exit indicates how much of the buffer was used.
- outPropertyData
- The buffer into which the object will put the data for the given property.
- function result
- An OSStatus indicating success or failure.
Retrieve information about the given property of an AudioStream.
extern OSStatus AudioStreamGetPropertyInfo (
AudioStreamID inStream,
UInt32 inChannel,
AudioDevicePropertyID inPropertyID,
UInt32* outSize,
Boolean* outWritable
) AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER;
Parameter Descriptions
- inStream
- The AudioStream to query.
- inChannel
- The channel of the property to query where 0 is the master channel.
- inPropertyID
- The AudioDevicePropertyID of the property to query.
- outSize
- A pointer to a UInt32 that receives the size of the property data in bytes
on exit. This can be NULL if the size information is not being requested.
- outWritable
- A pointer to a Boolean that receives indication of whether or not the given
property can be set. This can be NULL if the writability is not being
requested.
- function result
- An OSStatus indicating success or failure.
Unregisters the given AudioStreamPropertyListenerProc from receiving
notifications when the given property changes.
extern OSStatus AudioStreamRemovePropertyListener (
AudioStreamID inStream,
UInt32 inChannel,
AudioDevicePropertyID inPropertyID,
AudioStreamPropertyListenerProc inProc
) AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER;
Discussion
Note that the same functionality is provided by
AudioObjectRemovePropertyListener in conjunction with
AudioObjectPropertyListenerProc.
Parameter Descriptions
- inStream
- The AudioStream with whom to unregister the listener.
- inChannel
- The channel of the property to unregister from.
- inPropertyID
- The AudioDevicePropertyID of the property to stop listening to.
- inProc
- AudioStreamPropertyListenerProc to unregister.
- function result
- An OSStatus indicating success or failure.
Tells the AudioStream object to change the value of the given property using the
provided data.
extern OSStatus AudioStreamSetProperty (
AudioStreamID inStream,
const AudioTimeStamp* inWhen,
UInt32 inChannel,
AudioDevicePropertyID inPropertyID,
UInt32 inPropertyDataSize,
const void* inPropertyData
) AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER;
Discussion
Note that the value of the property should not be considered changed until the
HAL has called the listeners as many properties values are changed
asynchronously. Also note that the same functionality is provided by the
function AudioObjectGetPropertyData().
Parameter Descriptions
- inStream
- The AudioStream to change.
- inWhen
- A pointer to an AudioTimeStamp that says when to change the property's value
relative to the device's time base. NULL means execute the change
immediately.
- inChannel
- The channel of the property to change where 0 is the master channel.
- inPropertyID
- The AudioDevicePropertyID of the property to change.
- inPropertyDataSize
- A UInt32 indicating the size of the buffer pointed to by inData.
- inPropertyData
- The buffer containing the data to be used to change the property's value.
- function result
- An OSStatus indicating success or failure.
(Last Updated 12/13/2004)