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?) asyncParameters
- 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
scheduleFile(_:at:completionCallbackType:completionHandler:)scheduleSegment(_:startingFrame:frameCount:at:completionHandler:)scheduleSegment(_:startingFrame:frameCount:at:completionCallbackType:completionHandler:)scheduleBuffer(_:at:options:completionHandler:)scheduleBuffer(_:completionHandler:)scheduleBuffer(_:at:options:completionCallbackType:completionHandler:)scheduleBuffer(_:completionCallbackType:completionHandler:)AVAudioPlayerNodeBufferOptionsAVAudioPlayerNodeCompletionCallbackTypeAVAudioPlayerNodeCompletionHandler