Contents

scheduleBuffer(_:at:options:completionHandler:)

Schedules the playing samples from an audio buffer at the time and playback options you specify.

Declaration

func scheduleBuffer(_ buffer: AVAudioPCMBuffer, at when: AVAudioTime?, options: AVAudioPlayerNodeBufferOptions = [], completionHandler: (@Sendable () -> Void)? = nil)
func scheduleBuffer(_ buffer: AVAudioPCMBuffer, at when: AVAudioTime?, options: AVAudioPlayerNodeBufferOptions = []) async

Parameters

  • buffer:

    The buffer to play.

  • when:

    The time the buffer plays. For more information, see Avaudioplayernode.

  • options:

    The playback options that control buffer scheduling.

  • completionHandler:

    The handler the system calls after the player schedules the buffer for playback on the render thread, or the player stops.

See Also

Scheduling Playback