Initializes and returns an audio player using the specified URL and file type hint.
- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
A URL identifying the sound file to play. The audio data must be in a format supported by Core Audio.
A UTI that is used as a file type hint. The supported UTIs are defined in File Format UTIs.
If an error occurs, upon return the
NSErrorobject describes the error. Set to
NULLto ignore errors.
On success, an initialized
AVAudio object. If
out parameter contains an
NSError instance describing the problem.
uti file type hint tells the parser what kind of sound data to expect so that files which are not self identifying, or possibly even corrupt, can be successfully parsed.