AKTiming

@objc
public protocol AKTiming

A timing protocol used for syncronizing different audio sources.

  • Starts playback at a specific time.

    Declaration

    Swift

    @objc
    func start(at audioTime: AVAudioTime?)

    Parameters

    audioTime

    A time in the audio render context.

  • Stops playback immediately.

    Declaration

    Swift

    @objc
    func stop()
  • Declaration

    Swift

    var isStarted: Bool { get }
  • Set position in playback timeline (seconds).

    Declaration

    Swift

    @objc
    func setPosition(_ position: Double)
  • Timeline time at an audio time

    • Return: Position in the timeline context (seconds).

    Declaration

    Swift

    @objc(positionAtAudioTime:)
    func position(at audioTime: AVAudioTime?) -> Double

    Parameters

    audioTime

    A time in the audio render context.

  • Audio time at timeline time

    • Return: A time in the audio render context.

    Declaration

    Swift

    @objc(audioTimeAtPosition:)
    func audioTime(at position: Double) -> AVAudioTime?

    Parameters

    position

    Time in the timeline context (seconds).

  • Prepare for playback. After prepare has been called, the node should be ready to begine playback immediately. Any time consuming operations necessary for playback (eg. disk reads) should be complete once prepare has been called.

    Declaration

    Swift

    @objc
    optional func prepare()