AudioSessionAddPropertyListener(_:_:_:)
Adds a property listener callback function to your application’s audio session object.
Declaration
func AudioSessionAddPropertyListener(_ inID: AudioSessionPropertyID, _ inProc: AudioSessionPropertyListener!, _ inClientData: UnsafeMutableRawPointer!) -> OSStatusParameters
- inID:
The identifier for the audio session property whose value changes you want to listen for.
- inProc:
The name of your property listener callback function.
- inClientData:
Data that you would like to be passed to your property listener callback.
Return Value
A result code. See Result Codes.
Discussion
When an audio session property value changes, and you have added a listener callback for that property, the audio session object invokes the callback.
You can add exactly one listener callback for a given inID-inClientData pair. In other words, you can add more than one property listener callback function for a given audio session property, provided you pass a unique inClientData parameter value each time you add a property listener.
Audio session properties are listed and described in Audio Session Property Identifiers.
See Also
Functions
AudioFileReadPackets(_:_:_:_:_:_:_:)AudioComponentGetIcon(_:_:)AudioComponentGetLastActiveTime(_:)AudioHardwareServiceAddPropertyListener(_:_:_:_:)AudioHardwareServiceGetPropertyData(_:_:_:_:_:_:)AudioHardwareServiceGetPropertyDataSize(_:_:_:_:_:)AudioHardwareServiceHasProperty(_:_:)AudioHardwareServiceIsPropertySettable(_:_:_:)AudioHardwareServiceRemovePropertyListener(_:_:_:_:)AudioHardwareServiceSetPropertyData(_:_:_:_:_:_:)AudioOutputUnitGetHostIcon(_:_:)AudioOutputUnitPublish(_:_:_:_:)AudioSessionGetProperty(_:_:_:)AudioSessionGetPropertySize(_:_:)AudioSessionInitialize(_:_:_:_:)