I am following this tutorial :https://miguelsaldana.me/2017/03/13/how-to-create-a-soundcloud-like-waveform-in-swift-3/
My code given below .There is an exception :
Error Domain=com.apple.coreaudio.avfaudio Code=2003334207 “(null)” UserInfo={failed call=ExtAudioFileOpenURL((CFURLRef)fileURL, &_extAudioFile)}
let file = try! AVAudioFile(forReading: AudioLink) //Got Exception Here
let format = AVAudioFormat(commonFormat: .pcmFormatFloat32, sampleRate: file.fileFormat.sampleRate, channels: file.fileFormat.channelCount, interleaved: false)
print(file.fileFormat.channelCount)
let buf = AVAudioPCMBuffer(pcmFormat: format!, frameCapacity: UInt32(file.length))
try! file.read(into: buf!)
// print("floatArray \(readFile.arrayFloatValues)\n")
//self.waveFormView.setNeedsDisplay()