That’s what I’m already doing.
Here’s the main of code:
//Get some audio data
spectrum:=FSOUND_GetCurrentVU(0); //This works, GetSpectrum doesnt
//…Code here to move Opengl stuff around based on spectrum value
//If Record is switched on grab a frame
if (VideoRecord = True) and (PlayMode = 1) then begin
if WordTime <= FSOUND_Stream_GetLengthMs(MyStream) then begin
if FSOUND_Stream_GetTime(MyStream) – Lastone >= 40 then begin
Lastone := FSOUND_Stream_GetTime(MyStream);
//end of loop
My project makes vidoes out of OpenGL visualisations synced up to GetSpectrum data.
It’s not really possible to encode 25fps video in realtime so I have to pause the stream, grab a Video frame, then unpause the stream every 40ms (1000ms/25fps=40ms).
For some reason, probably because there is a slight delay in the FMOD DSP between pausing and playing the spectrum data never gets read.
If I do the same thing using the Get VU function it works.
So, rather than having to do a 2 pass scheme to get the spectrum data then play back the visualisation with the stored data I wondered if the spectrum could somehow be got from the the stream without having it playing.
I’ve stuck with using the VU data for now because it works. If you’ve got any ideas on using the Spectrum data instead I love to hear it.
Please login first to submit.