Contents

init(buffer:inputMode:shouldLoop:)

Init an AudioBufferResource from an AVAudioBuffer instead of a file location. This is intended for use with AVSpeechSynthesisVoice.

Declaration

@MainActor @preconcurrency init(buffer: AVAudioBuffer, inputMode: AudioResource.InputMode = .spatial, shouldLoop: Bool = false) throws

Parameters

  • inputMode:

    How the audio engine processes a resource. nonSpatial, spatial, ambient

  • shouldLoop:

    Bool value to decide if the audio clip should loop

Discussion

See Also

Deprecated