iphone - 如何读取麦克风输入? [英] iphone - How can i read the microphone input?

查看:189
本文介绍了iphone - 如何读取麦克风输入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从麦克风中读取声音数据?
我不想记录然后访问数据,我希望能够实时访问声音输入吗?

How can i read the sound data from the microphone? I don't want to record and then access the data, i want to be able to access the sound input live?

推荐答案

您可以将麦克风的声音(PCM样本)录制到非常短的内存缓冲区(持续时间短至几毫秒)。这与使用iOS API一样接近实时。查看aurioTouch示例,了解低延迟AudioUnit RemoteIO录制代码,并进行实时FFT分析和显示。

You can record sound (PCM samples) from the microphone to very short memory buffers (as short as a few milliseconds in duration). That's as close to "live" as there is using iOS API's. Look at the aurioTouch example for low latency AudioUnit RemoteIO recording code, with live FFT analysis and display.

这篇关于iphone - 如何读取麦克风输入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆