Contents

init(data:)

Creates a player to play in-memory audio data.

Declaration

init(data: Data) throws

Parameters

  • data:

    A buffer with the audio data to play.

Return Value

A new audio player instance, or nil if an error occurs.

Discussion

The audio data must be in a format that Core Audio supports.

See Also

Creating an audio player