init(fileNamed:)
Initializes an audio source from an audio file in the application’s main bundle.
Declaration
convenience init?(fileNamed name: String)Parameters
- name:
The name of an audio file in the application’s main bundle.
Return Value
A new audio source object.
Discussion
Calling this method is equivalent to using the Bundle class to locate an audio file in the application’s main bundle and then passing the resulting URL to the init(url:) method.