Instance Property

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 is another format.

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

If the format is not interleaved, as with the standard deinterleaved float format, then the pointers will be to separate chunks of memory and the stride property value is 1.

If the format is interleaved, then the pointers will 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

var frameCapacity: AVAudioFrameCount

The buffer's capacity, in audio sample frames.

var stride: Int

The buffer's number of interleaved channels.