ios上的录音和波形绘制
我正在使用 AVAudioRecorder 录制音频,录制后我想绘制录制音频的波形。我发现了一篇关于波形绘制的好文章,但它首先我需要特定采样率的频率作为浮点数,对吧?
我是否需要对音频进行FFT以及如何操作? *AVAudioRecorder** 是用于此目的的 API 吗?或者我需要使用一些较低的API来录制音频? 希望有人能帮助我。
I'm recording audio using AVAudioRecorder and after recording I want to draw a wave form of the recorded audio. I've found a nice article about wave form drawing, but it first I need the frequencies at a certain sample rate as floats, right?
Do I need to do FFT on the audio and how do I do this? Is *AVAudioRecorder** even the API for this purpose? Or do I need to use some lower API to record the audio?
Hope someone can help me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
AVAudioRecorder 看起来对此没有多大用处(尽管它可能是可能的)。您需要查看使用 AudioQueue 进行录音。
音频的“波形”不是频率。波形是构成音频的样本值(您可以在使用 AudioQueue 录制时获得这些值)。 FFT 将音频样本从时域转换到频域 - 如果绘制 FFT 的输出,您将得到频谱图而不是波形。
AVAudioRecorder doesn't look like it's much use for this (although it may be possible). You need to look at recording with AudioQueue.
The 'waveform' of the audio isn't the frequencies. The waveform is the value of the samples that make up the audio (you can get these when recording with an AudioQueue). FFT converts the audio samples from the time domain to the frequency domain - if you draw the output of the FFT you will have a Spectrograph instead of a waveform.