I have no problem creating, and writing to AVAudioFiles.
do {
audioFile = try AVAudioFile(forWriting: destinationPath, settings: format.settings)
print ("created: \(curFileLinkName)")
} catch { print ("error creating file")}
But is there a way to close the file?
I've searched and all I could find was this very post on StackOverflow, which makes me wonder.
Hello,
There is not, the file closes once the AVAudioFile is deinitialized. I recommend that you file an enhancement request for this functionality using Feedback Assistant, and provide a short description about how this functionality would benefit your app.