Contents

scheduleBuffer(buffer:time:options:completionCallbackType:completionHandler:)

Schedules audio data playback at a specific time with a completion handler.

Declaration

func scheduleBuffer(buffer: AVAudioPCMBuffer, time when: AVAudioTime?, options: PHASEPushStreamBufferOptions = [], completionCallbackType: PHASEPushStreamCompletionCallbackCondition, completionHandler: @escaping  @Sendable (PHASEPushStreamCompletionCallbackCondition) -> Void)
func scheduleBuffer(buffer: AVAudioPCMBuffer, time when: AVAudioTime?, options: PHASEPushStreamBufferOptions = [], completionCallbackType: PHASEPushStreamCompletionCallbackCondition) async -> PHASEPushStreamCompletionCallbackCondition

Parameters

  • buffer:

    Data that represents one portion of a contiguous audio stream.

  • when:

    The time to play the buffer.

  • options:

    The options for looping and buffer interruption.

  • completionCallbackType:

    The specific event on which to handle completion.

  • completionHandler:

    Code the framework runs on completion or when the player stops.

Discussion

See Also

Providing Audio Data