Hi,
I'd like to extract frequency data along with PCM data from an OggVorbis stream. (Think: displaying an equalizer during audio playback.) I figure this would be much cleaner (and faster) than running a discrete fourier transform on the PCM data after the fact.
I'm a fairly high level user of libogg and libvorbis (using libvorbisfile for now), but I've poked around a bit in the code, and I suspect the data I'm looking for is in the pcm array that enters mdct_backward(). Is that correct? I'd really appreciate some pointers on where in the decoding pipeline to get at this data, and what format it's in. For instance, how is the magnitude vs. phase laid out in memory per frequency?
Many thanks!
Eddy
I'm a fairly high level user of libogg and libvorbis (using libvorbisfile for now), but I've poked around a bit in the code, and I suspect the data I'm looking for is in the pcm array that enters mdct_backward(). Is that correct?
Thats going to give you the MDCT domain data, which is about as close to an DFT as you're going to find in Vorbis. I'm not really sure if theres an easy way to get something that'd look right for your visualization.