withAudioBufferList(blockBufferMemoryAllocator:flags:body:)
Calls a closure with an audio buffer list that contains the data from a sample buffer and a block buffer backing the audio buffers.
Declaration
func withAudioBufferList<R>(blockBufferMemoryAllocator: CFAllocator? = kCFAllocatorDefault, flags: CMSampleBuffer.Flags = [], body: (UnsafeMutableAudioBufferListPointer, CMBlockBuffer) throws -> R) throws -> RParameters
- blockBufferMemoryAllocator:
An allocator to use for the memory block held by a Cmblockbuffer Api.
- flags:
Optional flags that control the operation.
- body:
A closure the system calls that contains a pointer to an Audiobufferlist and the block buffer that backs its audio buffers.
Discussion
The system may not copy the data, depending on its contiguity and 16-byte alignment. It guarantees the buffers it places in the AudioBufferList are contiguous.
The system returns 16-byte-aligned buffers if you pass the audioBufferListAssure16ByteAlignment flag.