AudioQueuePropertyListenerProc
Called by the system when a specified audio queue property changes value.
Declaration
typealias AudioQueuePropertyListenerProc = (UnsafeMutableRawPointer?, AudioQueueRef, AudioQueuePropertyID) -> VoidParameters
- inUserData:
The custom data you’ve specified in the
inUserDataparameter of the Audioqueueaddpropertylistener(_:_:_:_:) function. - inAQ:
The recording or playback audio queue that invoked the callback.
- inID:
The ID of the property whose value changes you want to observe.
Discussion
If you name your callback function MyAudioQueuePropertyListenerProc, you would declare it like this:
Discussion
Install this callback in an audio queue by calling the AudioQueueAddPropertyListener(_:_:_:_:) function. For example, say you want your application to be notified, after you call the AudioQueueStop(_:_:) function with the inImmedate parameter set to false, that audio has finished playing. Perform these steps:
Define this property listener callback function to listen for changes to the kAudioQueueProperty_IsRunning property.
Install this callback, using the AudioQueueAddPropertyListener(_:_:_:_:) function, in the playback audio queue that you want to monitor.