AudioStreamBasicDescription

extension AudioStreamBasicDescription
extension AudioStreamBasicDescription: Equatable
extension AudioStreamBasicDescription: CustomDebugStringConvertible

Common Formats

Format Information

  • Returns true if this format is non-interleaved

    Declaration

    Swift

    public var isNonInterleaved: Bool { get }
  • Returns true if this format is interleaved

    Declaration

    Swift

    public var isInterleaved: Bool { get }
  • Returns the number of interleaved channels

    Declaration

    Swift

    public var interleavedChannelCount: UInt32 { get }
  • Returns the number of channel streams

    Declaration

    Swift

    public var channelStreamCount: UInt32 { get }
  • Returns the number of channels

    Declaration

    Swift

    public var channelCount: UInt32 { get }
  • Returns true if this format is linear PCM

    Declaration

    Swift

    public var isPCM: Bool { get }
  • Returns true if this format is big-endian

    Declaration

    Swift

    public var isBigEndian: Bool { get }
  • Returns true if this format is little-endian

    Declaration

    Swift

    public var isLittleEndian: Bool { get }
  • Returns true if this format is native-endian

    Declaration

    Swift

    public var isNativeEndian: Bool { get }
  • Returns true if this format is floating-point linear PCM

    Declaration

    Swift

    public var isFloat: Bool { get }
  • Returns true if this format is integer linear PCM

    Declaration

    Swift

    public var isInteger: Bool { get }
  • Returns true if this format is signed integer linear PCM

    Declaration

    Swift

    public var isSignedInteger: Bool { get }
  • Returns true if this format is packed

    Declaration

    Swift

    public var isPacked: Bool { get }
  • Returns true if this format is high-aligned

    Declaration

    Swift

    public var isAlignedHigh: Bool { get }
  • Returns true if this format is non-mixable

    Note

    This flag is only used when interacting with HAL stream formats

    Declaration

    Swift

    public var isNonMixable: Bool { get }
  • Returns true if this format is mixable

    Note

    This flag is only used when interacting with HAL stream formats

    Declaration

    Swift

    public var isMixable: Bool { get }
  • Returns the sample word size in bytes

    Declaration

    Swift

    public var sampleWordSize: Int { get }
  • Returns the byte size of frameCount audio frames

    Note

    This is equivalent to frameCount * mBytesPerFrame

    Declaration

    Swift

    public func byteSize(forFrameCount frameCount: Int) -> Int
  • Returns the frame count of byteSize bytes

    Note

    This is equivalent to byteSize / mBytesPerFrame

    Declaration

    Swift

    public func frameCount(forByteSize byteSize: Int) -> Int

Format Transformation

  • Returns the equivalent non-interleaved format of self

    Note

    This returns nil for non-PCM formats

    Declaration

    Swift

    public func nonInterleavedEquivalent() -> AudioStreamBasicDescription?
  • Returns the equivalent interleaved format of self

    Note

    This returns nil for non-PCM formats

    Declaration

    Swift

    public func interleavedEquivalent() -> AudioStreamBasicDescription?
  • Returns the equivalent standard format of self

    Note

    This returns nil for non-PCM formats

    Declaration

    Swift

    public func standardEquivalent() -> AudioStreamBasicDescription?
  • Resets self to the default state

    Declaration

    Swift

    public mutating func reset()
  • Declaration

    Swift

    public static func == (lhs: AudioStreamBasicDescription, rhs: AudioStreamBasicDescription) -> Bool
  • Declaration

    Swift

    public var debugDescription: String { get }