Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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. 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.

like image 276
Chris Avatar asked Apr 20 '11 09:04

Chris


1 Answers

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.

like image 106
hooleyhoop Avatar answered Oct 10 '22 11:10

hooleyhoop