Re: Newbie questions - Waveform during recording
Re: Newbie questions - Waveform during recording
- Subject: Re: Newbie questions - Waveform during recording
- From: Jens Alfke <email@hidden>
- Date: Mon, 23 Jun 2008 09:51:55 -0700
On 23 Jun '08, at 8:55 AM, Charles Gregory wrote:
Then you might want to look into: Discrete Fourier Transform, and
more specifically the Fast Fourier Transfer which will allow you to
analyse the frequency content of your recording.
There's really no practical need to know the mathematics just to get a
frequency display. The vecLib in the OS already includes a highly
optimized FFT implemenation, and at a higher level there are
AudioUnits that do spectral analysis. So if you just want to implement
the display, all you need to work with is the AudioUnits API.
(That said, the math is interesting to learn in its own right.)
On 23 Jun '08, at 9:02 AM, Alex Kac wrote:
Let me put it a different way. I can see how to do it all on
playback. I just can't see how to do it during recording. The
properties are different and I'm not seeing anything to help there.
I think you'll need to take the audio sample buffers the queue is
giving you, and feed them into an AudioUnit (as well as saving the
audio to disk or whatever.) I don't remember the name of the AudioUnit
that does frequency analysis, but if you look through the AU headers,
there's one that defines constants for all the different types of units.
Note that you'll need to tell the queue to generate uncompressed (PCM)
data since that's what AudioUnits work on. If you want to save the
data in compressed form, you can run the output into an ExtAudioFile,
which will do the compression and saving to disk for you.
—Jens _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden