fatal error: 'try!' expression unexpectedly raised an error: Error Domain=com.apple.coreaudio.avfaudio Code=2003334207 "(null)" UserInfo={failed call=ExtAudioFileOpenURL((CFURLRef)fileURL, &_extAudioFile)}: file /Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-703.0.18.8/src/swift/stdlib/public/core/ErrorType.swift, line 54
The line that's crashing is in AKAudioPlayer.init(_ file: String) on the line:
audioFile = try! AVAudioFile(forReading: url)
Am I doing this right? I get an odd URL for the file which might be the issue? It looks like this: ipod-library://item/item.mp3?id=1259119331107901091 though it may be m4a etc according to the actual file type.
I cannot add the asset to the app for copyright reasons and it also allows some amount of user choice which will be of benefit in this case.
I'm currently using the v3.1.2 as my AK build, compiled along with my app, though it also crashes with the same issue on develop.
ps: been away for a while but my app's had great reception within the Stormtrooper community, something that wouldn't have been possible without AudioKit.