Contents

floatChannelData

The buffer’s audio samples as floating point values.

Declaration

var floatChannelData: UnsafePointer<UnsafeMutablePointer<Float>>? { get }

Discussion

The floatChannelData property returns pointers to the buffer’s audio samples if the buffer’s format is 32-bit float. It returns nil if it’s another format.

The returned pointer is to format.channelCount pointers to float. Each of these pointers is to frameLength valid samples, which the class spaces by stride samples.

If the format isn’t interleaved, as with the standard deinterleaved float format, the pointers point to separate chunks of memory, and the stride property value is 1.

When the format is in an interleaved state, the pointers refer to the same buffer of interleaved samples, each offset by 1 frame, and the stride property value is the number of interleaved channels.

See Also

Accessing PCM Buffer Data