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