更快地更新通道峰值功率
我正在使用 NSTimer 更新 iPhone 的峰值功率。从监测来看,更新速度不是很快。我需要以 100 微秒 (100us) 的频率更新峰值功率。我还尝试使用 usleep(100) 每 100us 更新一次。还是很慢。有人可以帮我指出如何实现这一目标吗?我想我需要使用这段代码来测量距离。谢谢。
I am using NSTimer to update peak power from iphone. From monitoring, it does not update very fast. I need high frequency of updating peak power in order of 100 micro second (100us). I also try with usleep(100) to update every 100us. Still very slow. Can someone help me to point out how to achieve this? I am thinking I need to use this code to measure distance. Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您捕获音频(记录、输入或文件),从 pcm cbr(未压缩,具有固定采样率)流访问其样本,并读取您感兴趣的范围的样本。考虑到高频,您将只需分析少量样本(2-5,取决于采样率)。您可能需要进行插值以提高样本数量如此少的准确性。
you capture the audio (record, input, or file), access its samples from the pcm cbr (uncompressed, with a fixed sampling rate) stream, and read the samples of the range you are interested in. considering the high frequency, you will only have to analyze a small number of samples (2-5, depending on the sampling rate). you may need to interpolate to improve accuracy with so few samples.