AudioFileStreamSeek

Function AudioFileStreamSeek 

Source
pub unsafe extern "C-unwind" fn AudioFileStreamSeek(
    in_audio_file_stream: AudioFileStreamID,
    in_packet_offset: i64,
    out_data_byte_offset: NonNull<i64>,
    io_flags: NonNull<AudioFileStreamSeekFlags>,
) -> i32
Available on crate feature AudioFileStream only.
Expand description

This call is used to seek in the data stream. The client passes in a packet offset to seek to and the parser passes back a byte offset from which to get the data to satisfy that request. The data passed to the next call to AudioFileParseBytes will be assumed to be from that byte offset. For file formats which do not contain packet tables the byte offset may be an estimate. If so, the flag kAudioFileStreamSeekFlag_OffsetIsEstimated will be true.

Parameter inAudioFileStream: The file stream ID

Parameter inPacketOffset: The offset from the beginning of the file of the packet to which to seek.

Parameter outDataByteOffset: The byte offset of the data from the file’s data offset returned. You need to add the value of kAudioFileStreamProperty_DataOffset to get an absolute byte offset in the file.

Parameter ioFlags: If outDataByteOffset is an estimate, then kAudioFileStreamSeekFlag_OffsetIsEstimated will be set on output. There are currently no flags defined for passing into this call.

§Safety

  • in_audio_file_stream must be a valid pointer.
  • out_data_byte_offset must be a valid pointer.
  • io_flags must be a valid pointer.