iOS Code to Convert m4a to WAV
问题 Does anyone have any code snippets that show how to convert an M4a file to WAV? I know there are libraries that convert the other way around. Thanks. 回答1: Just to update for Swift 3: func convertAudio(_ url: URL, outputURL: URL) { var error : OSStatus = noErr var destinationFile: ExtAudioFileRef? = nil var sourceFile : ExtAudioFileRef? = nil var srcFormat : AudioStreamBasicDescription = AudioStreamBasicDescription() var dstFormat : AudioStreamBasicDescription = AudioStreamBasicDescription()