Function AudioCodecAppendInputData

Source
pub unsafe extern "C-unwind" fn AudioCodecAppendInputData(
    in_codec: AudioCodec,
    in_input_data: NonNull<c_void>,
    io_input_data_byte_size: NonNull<u32>,
    io_number_packets: NonNull<u32>,
    in_packet_description: *const AudioStreamPacketDescription,
) -> i32
Available on crate features AudioComponent and objc2-core-audio-types and AudioCodec only.
Expand description

Append as much of the given data in inInputData to the codec’s input buffer as possible and return in ioInputDataByteSize the amount of data used.

The inPacketDescription argument is an array of AudioStreamPacketDescription structs that describes the packet layout. The number of elements in this array is indicated on input by ioNumberPackets. On return, this number indicates the number of packets consumed.

Note also in this case that it is an error to supply less than a full packet of data at a time.

Parameter inCodec: An AudioCodec instance

Parameter inInputData: A const pointer to the input data

Parameter ioInputDataByteSize: The size in bytes of the input data in inInputData on input, the number of bytes consumed on output

Parameter ioNumberPackets: The number of packets

Parameter inPacketDescription: The packet description pointer

Returns: The OSStatus value