AVAudioRecorder and audio data file offset of wav audio file

天涯浪子 提交于 2019-12-10 23:44:13

问题


wav file afinfo command give the audio data offset as 4096, Is there any way to change data offset to 44 on macOS or iOS using AVFoundation

my setting as follows

func exportSettings() -> Dictionary <String, Any> {

    var recordingSetting :[String:Any] = [AVLinearPCMBitDepthKey: 16, AVNumberOfChannelsKey : 1, AVSampleRateKey : 16_000, AVLinearPCMIsBigEndianKey : 0, AVLinearPCMIsFloatKey : 0]
    recordingSetting[AVFormatIDKey] = Int(kAudioFormatLinearPCM)
    recordingSetting[AVChannelLayoutKey] = NSData(bytes: nil, length: 0)
    recordingSetting[AVLinearPCMIsNonInterleaved] = 0
    return recordingSetting
}

thanks

来源:https://stackoverflow.com/questions/51277675/avaudiorecorder-and-audio-data-file-offset-of-wav-audio-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!