Describes one packet in a buffer of audio data where the sizes of the packets differ or where there is non-audio data between audio packets.


struct AudioStreamPacketDescription


For data formats where the packet size is not constant, such as variable bit rate data and data where the channels have unequal sizes, this structure is used to supplement the information in the AudioStreamBasicDescription structure.


Instance Properties

var mDataByteSize: UInt32

The number of bytes in the packet.

var mStartOffset: Int64

The number of bytes from the start of the buffer to the beginning of the packet. For example, if the data buffer contains 5 bytes of data, with one byte per packet, then mStartOffset for the last packet is 4 (that is, there are 4 bytes in the buffer before the start of the last packet.

var mVariableFramesInPacket: UInt32

The number of sample frames of data in the packet. For formats with a constant number of frames per packet, this field is set to 0.