Contents

kExtAudioFileProperty_PacketTable

This property can be used to override the priming and remainder information in an audio file, and also to retrieve the current priming and remainder frames information for an extended audio file object. If the underlying file type does not provide packet table information, attempting to get the value of this property returns an error.

Declaration

var kExtAudioFileProperty_PacketTable: ExtAudioFilePropertyID { get }

Discussion

By setting this property with a nonnegative number (which may be the value 0), you override the corresponding settings for the values contained in the file. If you use a value of -1 for either the priming or remainder frames, the extended audio file object uses the corresponding value stored in the file.

Retrieving the value of this property always retrieves the value the extended audio file object is using, whether derived from the file or from your override.

To determine the value in the file, use the kAudioFilePropertyPacketTableInfo property as described in Audio File Services.

When the property is set, only the remaining and priming values are used. Set the mNumberValidFrames field of the AudioFilePacketTableInfo struct to zero. For example, a file encoded using AAC may have 2112 samples of priming at the start of the file and a remainder of 823 samples at the end. When an extended audio file object returns decoded samples to you, it trims off the at the start of the file, and trims off the at the end. It gets these numbers initially from the file. A common use case for overriding this would be to set the priming and remainder samples to 0. In this example, you would retrieve an additional 2112 samples of silence from the start of the file and 823 samples of silence at the end of the file (silence, because the encoders use silence to pad out these priming and remainder samples).

See Also

Constants