0
0

Ok I want to do a simple spectrum analyser on the smartphone whilst playing an mp3.

the code i am using so far is basically this:

float *SpectrumBuffer;
FSOUND_STREAM *Track = NULL;

FSOUND_Init(22050, 1, FSOUND_INIT_GLOBALFOCUS);
FSOUND_Stream_SetBufferSize(2000);
FSOUND_DSP_SetActive(FSOUND_DSP_GetFFTUnit(),TRUE);

Track = FSOUND_Stream_OpenFile(“\Storage Card\Song.mp3”,FSOUND_2D,0);

SpectrumBuffer = FSOUND_DSP_GetSpectrum( );
and then get the values.

Can someone confirm if this is the correct way to do this?
When I activate the dsp my phone goes to a crawl and cannot operate.

Is there any where I can change the rate that it takes the samples to get this to run without so much cpu overhead?

Thanx in advance for any help.

Croccy22
Matt.

  • You must to post comments
0
0

That would be really kewl. The smartphone is missing a good player with visualisations.

This would be a great addition and I really hope you can include it.

SPVAMP Officially on hold :(

Matt

  • You must to post comments
0
0

Do you know which example uses this so I can have a look at it.

Basically all I am after is a piece of code that will give me say 20 values that i can use to draw a simple bar chart analyser. Once I have done this then all the other visualisations can be built from this.

Any chance of some sample code?

Also one question, what do you think I should have the buffer set as for the smartphone playing mp3 files. At the moment it is set at 2000ms, but I still find that it skips a few times in the song, Any way around this??

Thanx in advance..
Matt

  • You must to post comments
0
0

Hi again,

Soryy about this but i have looked at the fmodcesample that i have got and i can’t see any grpahical stuff apart from the drawing of the menus. Could you possibly post the bit of code that draws the waveform?

Thanx in advance.

Matt
Croccy22

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.