init(contentsOf:)
Creates a player to play audio from a file.
Declaration
init(contentsOf url: URL) throwsParameters
- url:
A URL that identifies the local audio file 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.