FloatBuffer
final class FloatBuffer: EquatableA contiguous buffer of 32-bit floating-point audio samples.
-
Creates a
FloatBufferby copyinglengthelements fromdata, or zero-initializing whendataisnil.Declaration
Swift
convenience init(data: UnsafePointer<Float>?, length: Int) -
Creates a
FloatBuffercopied fromelements.Declaration
Swift
init(elements: [Float]) -
Creates a
FloatBufferoflengthelements initialized to zero.Declaration
Swift
convenience init(length: Int) -
A copy of the buffer's elements.
Declaration
Swift
final var elements: [Float] { get } -
The number of elements in the buffer.
Declaration
Swift
final var length: Int { get } -
Resets all elements in the buffer to
0.0.Declaration
Swift
final func clear() -
Returns an independent deep copy of this
FloatBuffer.Declaration
Swift
final func copy() -> FloatBuffer -
Calls
bodywith an immutableUnsafeBufferPointerto the buffer's elements.Declaration
Swift
final func withUnsafeBufferPointer<Result>(_ body: (UnsafeBufferPointer<Float>) throws -> Result) rethrows -> Result -
Calls
bodywith anUnsafeMutableBufferPointerto the buffer's elements.Declaration
Swift
final func withUnsafeMutableBufferPointer<Result>(_ body: (UnsafeMutableBufferPointer<Float>) throws -> Result) rethrows -> Result