pub type AudioQueueInputCallbackBlock = *mut DynBlock<dyn Fn(AudioQueueRef, AudioQueueBufferRef, NonNull<AudioTimeStamp>, u32, *const AudioStreamPacketDescription)>;
AudioQueue
and block2
and objc2-core-audio-types
only.Expand description
Defines a pointer to a block that is called when a recording audio queue has finished filling a buffer.
You specify a recording buffer callback when calling AudioQueueNewInput. Your callback is invoked each time the recording audio queue has filled a buffer with input data. Typically, your callback should write the audio queue buffer’s data to a file or other buffer, and then re-queue the audio queue buffer to receive more data.
Parameter inAQ
: The audio queue that invoked the callback.
Parameter inBuffer
: An audio queue buffer, newly filled by the audio queue, containing the new audio data
your callback needs to write.
Parameter inStartTime
: A pointer to an audio time stamp structure corresponding to the first sample contained
in the buffer. This contains the sample time of the first sample in the buffer.
Parameter inNumberPacketDescriptions
: The number of audio packets contained in the data provided to the callback
Parameter inPacketDescs
: For compressed formats which require packet descriptions, the packet descriptions
produced by the encoder for the incoming buffer.
See also Apple’s documentation