Contents

scheduleFile(_:at:completionHandler:)

Schedules the playing of an entire audio file.

Declaration

func scheduleFile(_ file: AVAudioFile, at when: AVAudioTime?, completionHandler: (@Sendable () -> Void)? = nil)
func scheduleFile(_ file: AVAudioFile, at when: AVAudioTime?) async

Parameters

  • file:

    The URL of the file to play.

  • when:

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

  • completionHandler:

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

See Also

Scheduling Playback