<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 4.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFAudio",
  "identifier" : "/documentation/AVFAudio/AVAudioPlayerNode/scheduleBuffer(_:at:options:completionCallbackType:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFAudio"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAudioPlayerNode(im)scheduleBuffer:atTime:options:completionCallbackType:completionHandler:"
  },
  "title" : "scheduleBuffer(_:at:options:completionCallbackType:completionHandler:)"
}
-->

# scheduleBuffer(_:at:options:completionCallbackType:completionHandler:)

Schedules the playing samples from an audio buffer with the playback options you specify.

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

## Parameters

`buffer`

The buffer to play.

`when`

The time the buffer plays.

`options`

The playback options that control buffer scheduling.

`callbackType`

The option to specify when the system must call the completion handler.

`completionHandler`

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

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)