简体   繁体   English

在ios上的录音和波形图画

[英]Audio recording and wave form drawing on ios

I'm recording audio using AVAudioRecorder and after recording I want to draw a wave form of the recorded audio. 我正在使用AVAudioRecorder录制音频,录制后我想绘制录制音频的波形 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? 我需要对音频进行FFT ,我该怎么做? Is *AVAudioRecorder** even the API for this purpose? * AVAudioRecorder **甚至是用于此目的的API吗? Or do I need to use some lower API to record the audio? 或者我是否需要使用较低的API来录制音频? Hope someone can help me. 希望可以有人帮帮我。

AVAudioRecorder doesn't look like it's much use for this (although it may be possible). AVAudioRecorder看起来并不是很有用(虽然它可能)。 You need to look at recording with AudioQueue. 您需要使用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). 波形是组成音频的样本的值(您可以在使用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. FFT将音频样本从时域转换到频域 - 如果绘制FFT的输出,则将使用光谱仪而不是波形。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM