iOS 编程,从在线流保存/制作音频文件!
请帮忙,如果您在某处有一堆代码、方法或其他东西,我需要在应用程序流式传输音频时制作一个音频文件,并将结果保存为文件,可能是 mp3 或其他文件,提前致谢。
Please help, if you have a bunch of code somewhere, a method or something, I need to make an audio file while the application is streaming the audio, and save the result as file, maybe mp3 or other, thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用核心音频扩展音频文件服务写出您有权访问示例的音频数据:
http://developer.apple.com/library/ios/#documentation/MusicAudio/Reference/ExtendedAudioFileServicesReference/Reference/reference.html
我只用它来写出 PCM 文件,但是文档表明压缩格式也可以。尽管异步写入需要更多设置,但您可以在同步和异步写入之间进行选择。
You can use the Core Audio Extended Audio File Services to write out audio data that you have access to the samples for:
http://developer.apple.com/library/ios/#documentation/MusicAudio/Reference/ExtendedAudioFileServicesReference/Reference/reference.html
I have only used it to write out PCM files, but the documentation suggests that compressed formats are also fine. You have a choice between synchronous and asynchronous writing although there is more setup needed for asynchronous writes.