Contents

setDataBuffer(fromAudioBufferList:blockBufferMemoryAllocator:flags:)

Creates a block buffer that contains a copy of the data from an audio buffer list, and sets it as the sample buffer’s data.

Declaration

func setDataBuffer(fromAudioBufferList bufferList: UnsafePointer<AudioBufferList>, blockBufferMemoryAllocator: CFAllocator? = kCFAllocatorDefault, flags: CMSampleBuffer.Flags = []) throws

Parameters

  • bufferList:

    The audio buffer list from which to copy the data.

  • blockBufferMemoryAllocator:

    An allocator to use for the memory block that the block buffer holds.

  • flags:

    Optional flags that control the operation.

Discussion

Pass the audioBufferListAssure16ByteAlignment flag to have the system create 16-byte-aligned buffers.

See Also

Modifying Sample Buffers