One Logo Pool Ball
AVFAudio · IOS API REFERENCE

AVAudioPlayerNode

class · iOS 8.0+ · SDK 27.1

class AVAudioPlayerNode

Members (21)

init · iOS 8.0+

init

TypeScript
static init(): AVAudioPlayerNode
Swift declaration
init()
method · iOS 8.0+

nodeTime

TypeScript
nodeTime(playerTime: AVAudioTime): (AVAudioTime) | null
Swift declaration
func nodeTime(forPlayerTime playerTime: AVAudioTime) -> AVAudioTime?
method · iOS 8.0+

pause

TypeScript
pause(): void
Swift declaration
func pause()
method · iOS 8.0+ · Deprecated in iOS 27.0

play

TypeScript
play(): void
Swift declaration
func play()
method · iOS 27.0+

playAudio

TypeScript
playAudio(): void
Swift declaration
func playAudio() throws
method · iOS 8.0+ · Deprecated in iOS 27.0

play

TypeScript
playAt(when?: (AVAudioTime) | null): void
Swift declaration
func play(at when: AVAudioTime?)
method · iOS 27.0+

playAudio

TypeScript
playAudioAt(when?: (AVAudioTime) | null): void
Swift declaration
func playAudio(at when: AVAudioTime?) throws
method · iOS 8.0+

playerTime

TypeScript
playerTime(nodeTime: AVAudioTime): (AVAudioTime) | null
Swift declaration
func playerTime(forNodeTime nodeTime: AVAudioTime) -> AVAudioTime?
method · iOS 8.0+

prepare

TypeScript
prepare(frameCount: number): void
Swift declaration
func prepare(withFrameCount frameCount: AVAudioFrameCount)
method · iOS 11.0+

scheduleBuffer

TypeScript
scheduleBufferAtOptionsCompletionCallbackTypeCompletionHandler(buffer: AVAudioPCMBuffer, when: (AVAudioTime) | null, options: AVAudioPlayerNodeBufferOptions, callbackType: AVAudioPlayerNodeCompletionCallbackType, completionHandler?: (((arg0: AVAudioPlayerNodeCompletionCallbackType) => void)) | null): void
Swift declaration
func scheduleBuffer(_ buffer: AVAudioPCMBuffer, at when: AVAudioTime?, options: AVAudioPlayerNodeBufferOptions = [], completionCallbackType callbackType: AVAudioPlayerNodeCompletionCallbackType) async -> AVAudioPlayerNodeCompletionCallbackType
method · iOS 8.0+

scheduleBuffer

TypeScript
scheduleBufferAtOptionsCompletionHandler(buffer: AVAudioPCMBuffer, when?: (AVAudioTime) | null, options?: AVAudioPlayerNodeBufferOptions, completionHandler?: ((() => void)) | null): void
Swift declaration
func scheduleBuffer(_ buffer: AVAudioPCMBuffer, at when: AVAudioTime?, options: AVAudioPlayerNodeBufferOptions = []) async
method · iOS 11.0+

scheduleBuffer

TypeScript
scheduleBufferCompletionCallbackTypeCompletionHandler(buffer: AVAudioPCMBuffer, callbackType: AVAudioPlayerNodeCompletionCallbackType, completionHandler?: (((arg0: AVAudioPlayerNodeCompletionCallbackType) => void)) | null): void
Swift declaration
func scheduleBuffer(_ buffer: AVAudioPCMBuffer, completionCallbackType callbackType: AVAudioPlayerNodeCompletionCallbackType) async -> AVAudioPlayerNodeCompletionCallbackType
method · iOS 8.0+

scheduleBuffer

TypeScript
scheduleBufferCompletionHandler(buffer: AVAudioPCMBuffer, completionHandler?: ((() => void)) | null): void
Swift declaration
func scheduleBuffer(_ buffer: AVAudioPCMBuffer) async
method · iOS 11.0+

scheduleFile

TypeScript
scheduleFileAtCompletionCallbackTypeCompletionHandler(file: AVAudioFile, when: (AVAudioTime) | null, callbackType: AVAudioPlayerNodeCompletionCallbackType, completionHandler?: (((arg0: AVAudioPlayerNodeCompletionCallbackType) => void)) | null): void
Swift declaration
func scheduleFile(_ file: AVAudioFile, at when: AVAudioTime?, completionCallbackType callbackType: AVAudioPlayerNodeCompletionCallbackType) async -> AVAudioPlayerNodeCompletionCallbackType
method · iOS 8.0+

scheduleFile

TypeScript
scheduleFileAtCompletionHandler(file: AVAudioFile, when?: (AVAudioTime) | null, completionHandler?: ((() => void)) | null): void
Swift declaration
func scheduleFile(_ file: AVAudioFile, at when: AVAudioTime?) async
method · iOS 11.0+

scheduleSegment

TypeScript
scheduleSegmentStartingFrameFrameCountAtCompletionCallbackTypeCompletionHandler(file: AVAudioFile, startFrame: number, numberFrames: number, when: (AVAudioTime) | null, callbackType: AVAudioPlayerNodeCompletionCallbackType, completionHandler?: (((arg0: AVAudioPlayerNodeCompletionCallbackType) => void)) | null): void
Swift declaration
func scheduleSegment(_ file: AVAudioFile, startingFrame startFrame: AVAudioFramePosition, frameCount numberFrames: AVAudioFrameCount, at when: AVAudioTime?, completionCallbackType callbackType: AVAudioPlayerNodeCompletionCallbackType) async -> AVAudioPlayerNodeCompletionCallbackType
method · iOS 8.0+

scheduleSegment

TypeScript
scheduleSegmentStartingFrameFrameCountAtCompletionHandler(file: AVAudioFile, startFrame: number, numberFrames: number, when?: (AVAudioTime) | null, completionHandler?: ((() => void)) | null): void
Swift declaration
func scheduleSegment(_ file: AVAudioFile, startingFrame startFrame: AVAudioFramePosition, frameCount numberFrames: AVAudioFrameCount, at when: AVAudioTime?) async
method · iOS 8.0+

stop

TypeScript
stop(): void
Swift declaration
func stop()
get · iOS 8.0+

isPlaying

TypeScript
get isPlaying(): boolean
Swift declaration
var isPlaying: Bool { get }
method · iOS 27.0+

scheduleBuffer

TypeScript
scheduleBufferAtTimeOptionsCompletionCallbackTypeCompletionHandler(buffer: AVReadOnlyAudioPCMBuffer, when?: (AVAudioTime) | null, options?: AVAudioPlayerNodeBufferOptions, callbackType?: AVAudioPlayerNodeCompletionCallbackType, completionHandler?: ((() => void)) | null): void
Swift declaration
func scheduleBuffer(_ buffer: AVReadOnlyAudioPCMBuffer, atTime when: AVAudioTime? = nil, options: AVAudioPlayerNodeBufferOptions = [], completionCallbackType callbackType: AVAudioPlayerNodeCompletionCallbackType = .dataConsumed, completionHandler: (@Sendable () -> Void)? = nil)

Schedules playing samples from a read-only audio buffer. - Parameters: - buffer: The read-only buffer to play. - when: The time at which to play the buffer. Nil means "follow previous command". - options: Options for looping, interrupting, etc. - callbackType: Specifies when the completion handler is called. - completionHandler: Called after the buffer has been consumed, rendered, or played back. May be nil.

method · iOS 27.0+

scheduleBuffer

TypeScript
scheduleBufferAtTimeOptionsCompletionCallbackTypeCompletionHandler5497(buffer: AVAudioPCMBuffer, when: (AVAudioTime) | null, options: AVAudioPlayerNodeBufferOptions, callbackType: AVAudioPlayerNodeCompletionCallbackType, completionHandler?: ((() => void)) | null): void
Swift declaration
func scheduleBuffer(_ buffer: AVAudioPCMBuffer, atTime when: AVAudioTime? = nil, options: AVAudioPlayerNodeBufferOptions = [], completionCallbackType callbackType: AVAudioPlayerNodeCompletionCallbackType, completionHandler: (@Sendable () -> Void)?)

Schedules playing samples from an audio buffer. - Parameters: - buffer: The buffer to play. - when: The time at which to play the buffer. Nil means "follow previous command". - options: Options for looping, interrupting, etc. - callbackType: Specifies when the completion handler is called. - completionHandler: Called after the buffer has been consumed, rendered, or played back. May be nil.

Skipped declarations

No declarations were skipped in this snapshot.

All AVFAudio types →