AudioDeviceRead

Function AudioDeviceRead 

Source
pub unsafe extern "C-unwind" fn AudioDeviceRead(
    in_device: AudioDeviceID,
    in_start_time: NonNull<AudioTimeStamp>,
    out_data: NonNull<AudioBufferList>,
) -> i32
👎Deprecated
Available on crate features AudioHardware and AudioHardwareDeprecated and objc2-core-audio-types only.
Expand description

Read some data from an AudioDevice starting at the given time.

With the advent of aggregate devices, the need for AudioDeviceRead has gone away. Consequently, this function is now deprecated.

Parameter inDevice: The AudioDevice to read from.

Parameter 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.

Parameter 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.

Returns: An OSStatus indicating success or failure. kAudioHardwareUnsupportedOperationError will be returned if the AudioDevice does not support direct reading.