iPhone: NSData representation of Audio file for Editing

╄→гoц情女王★ 提交于 2019-11-30 22:40:57

I think your best bet would be to use an ExtAudioFileRef to extract the audio samples of each file into buffers.

Then you can freely mix the samples together to and from whatever position you like and save the new mixed file to disk using ExtAudioFileWriteAsync.

For example: Extract sound 1 into buffer A. Extract sound 2 into buffer B.

Create buffer C whose size is A's length plus B's length. Then write that buffer to disk in whatever format you want using ExtAudioFileWriteAsync.

That file should then be playable by AVAudioPlayer.

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