Type Alias AudioQueueInputCallback

Source
pub type AudioQueueInputCallback = Option<unsafe extern "C-unwind" fn(*mut c_void, AudioQueueRef, AudioQueueBufferRef, NonNull<AudioTimeStamp>, u32, *const AudioStreamPacketDescription)>;
Available on crate features AudioQueue and objc2-core-audio-types only.
Expand description

Defines a pointer to a callback function 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 inUserData: The value you’ve specified in the inUserData parameter of the AudioQueueNewInput function.

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

Aliased Type§

pub enum AudioQueueInputCallback {
    None,
    Some(unsafe extern "C-unwind" fn(*mut c_void, *mut OpaqueAudioQueue, *mut AudioQueueBuffer, NonNull<AudioTimeStamp>, u32, *const AudioStreamPacketDescription)),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C-unwind" fn(*mut c_void, *mut OpaqueAudioQueue, *mut AudioQueueBuffer, NonNull<AudioTimeStamp>, u32, *const AudioStreamPacketDescription))

Some value of type T.