MediaPipeTasksRetrieval Framework Reference

AudioDataFormat

class AudioDataFormat: NSObject

Wraps properties describing the format of the incoming audio samples, namely number of channels and the sample rate.

  • Initializes a new AudioDataFormat with the given channel count and sample rate.

    Declaration

    Swift

    init(channelCount: UInt, sampleRate: CDouble)

    Parameters

    channelCount

    Number of channels.

    sampleRate

    Sample rate.

    Return Value

    A new instance of AudioDataFormat with the given channel count and sample rate.

  • Initializes a new AudioDataFormat with the default channel count of 1 and the given sample rate.

    Declaration

    Swift

    init(sampleRate: CDouble)

    Parameters

    sampleRate

    Sample rate.

    Return Value

    A new instance of AudioDataFormat with the default channel count of 1 and the given sample rate.

  • Number of channels

    Declaration

    Swift

    var channelCount: UInt { get }
  • Sample rate

    Declaration

    Swift

    var sampleRate: CDouble { get }