AudioFileWritePacketsWithDependencies(_:_:_:_:_:_:_:_:)
Declaration
func AudioFileWritePacketsWithDependencies(_ inAudioFile: AudioFileID, _ inUseCache: Bool, _ inNumBytes: UInt32, _ inPacketDescriptions: UnsafePointer<AudioStreamPacketDescription>?, _ inPacketDependencies: UnsafePointer<AudioStreamPacketDependencyDescription>, _ inStartingPacket: Int64, _ ioNumPackets: UnsafeMutablePointer<UInt32>, _ inBuffer: UnsafeRawPointer) -> OSStatusParameters
- inAudioFile:
The audio file to write to.
- inUseCache:
Set to
trueif you want to cache the data. Otherwise, set tofalse. - inNumBytes:
The number of bytes of audio data being written.
- inPacketDescriptions:
A pointer to an array of packet descriptions for the audio data. Not all formats require packet descriptions. If no packet descriptions are required, for instance, if you are writing CBR data, pass
NULL. - inPacketDependencies:
A pointer to an array of packet dependencies for the audio data. This must not be
NULL. To write packets without dependencies, use Audiofilewritepackets(_:_:_:_:_:_:_:) instead. - inStartingPacket:
The packet index for the placement of the first provided packet.
- ioNumPackets:
On input, a pointer to the number of packets to write. On output, a pointer to the number of packets actually written.
- inBuffer:
A pointer to user-allocated memory containing the new audio data to write to the audio data file.
Return Value
A result code. See Result Codes.
Discussion
Write packets of audio data with corresponding packet dependencies to an audio data file.
For all uncompressed formats, packets == frames.