How can can integrate a sound bar ?

Apprentice
Posts: 5
Joined: 2009.02
Post: #1
HI All,

I need to integrate a SoundBar in my application just like as speak here.
when we start recording that sound bar appears and move as a frequency meter.
In Speak here application CALayers used.

Is there anybody to suggest me how we can do this ..
Any help will be appreciable.

Thanks,
Raj...
Quote this message in a reply
Moderator
Posts: 3,577
Joined: 2003.06
Post: #2
To obtain frequency you will have to access the sound data in your recording callback. For instance, if you have:

AudioBufferList *ioData

as one of the parameters of your callback, you access the audio data with something like:

*data = bufferList->mBuffers[0].mData

Whether it's float data or some other kind of data depends on how you set things up earlier. You'll have to know how to do basic audio signal processing to figure out amplitude over time and determine the zeros to determine rising and falling edges, so you can figure out the period of the wave being measured. There's no built-in frequency meter that I am aware of.

With Audio Queues, no matter how you set things up, it seems to deliver the data in bursts every half second to second, so it's not ideal for real-time. For best real-time performance you'll need to use RemoteIO, which is a bit more involved to figure out, but delivers the data using basically the same callback. This article can help you figure out RemoteIO if you have to.
Quote this message in a reply
Post Reply