0
0

Is there any way to get spectrum values when the audio stream is not playing or paused.

Kim

  • You must to post comments
0
0

If the audio stream is not playing or paused, then will be no values for the spectrum anyway. What values are you expecting to get?

  • You must to post comments
0
0

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.

Thanks.

KimB

  • You must to post comments
0
0

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
FSOUND_SetPaused(0,True);
if FSOUND_Stream_GetTime(MyStream) – Lastone >= 40 then begin
Lastone := FSOUND_Stream_GetTime(MyStream);
AVIRecorder1.AddAVIFrame;
end;
FSOUND_SetPaused(0,False);
end;
end;

//end of loop

  • You must to post comments
0
0

Can’t you just store the current fft data first in a second array and then pause the stream, then when you are finished decoding the stream play some piece again, store fft data and pause again,… ?

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.