0
0

Hello.

Im trying to make a simple Oscilloscope and Frequency-thingy using FMOD EX in C++.

The problem is that to poll data from the DSP functions in FMOD, as far as ive understood, you have to playback sound using FMOD_Software and not the default FMOD_Hardware way.

Using the hardware way, im able to playback mp3-files, no problemo.
Once i change to Software sound, nothing happens. No errors, no sound, no dsp data. Every function return FMOD_OK.

Im really out of ideas here, any input would be gladly appreciated.

I have a feeling this could be OS related? Im running Vista 64-bit, and using an onboard soundcard.

[code:4lqt9i9m]
result = fmodsystem->createSound("bent.mp3", FMOD_HARDWARE|FMOD_2D,NULL, &fmodsound); // working fine (no dsp)
//result = fmodsystem->createSound("bent.mp3",FMOD_SOFTWARE|FMOD_2D,NULL,&fmodsound); // nothing happens (no errors though)[/code:4lqt9i9m]
I can provide additional code if wanted.

Thanks for your time.
Regards.
almagest.

  • You must to post comments
0
0

Hi almagest, welcome to the FMOD forums!

If you’re making a custom dsp for analysing data you need to make sure you’re copying the input data to the output buffer inside the dsp callback.

By the way, we generally recommend that you use software instead of hardware, it’s support more features and it will be consistent between platforms.

  • You must to post comments
0
0

[quote="peter":1y1pcraw]Hi almagest, welcome to the FMOD forums!

If you’re making a custom dsp for analysing data you need to make sure you’re copying the input data to the output buffer inside the dsp callback.

By the way, we generally recommend that you use software instead of hardware, it’s support more features and it will be consistent between platforms.[/quote:1y1pcraw]

Thanks for the quick reply!

Sadly, FMOD_Software does not work for me. It doesn’t playback anything at all! (but every function return FMOD_OK). Why is beyond me.
The FMOD_Hardware produces playback as intended though, but without the dsp functionality.

My current plan is to use only the System::getWaveData and System::getSpectrum to make visualizations using OpenGL.
So i guess if i want to make something more complex, i need to copy the data the way you describe.

-almagest.

EDIT: I spoke too soon. Disabled all DSP-stuff, and sound was ringing from my speaker. It looks like you were pretty much spot on. Would it be too much to ask kindly how something like that should be done? (the copying from buffer to output). DSP::getOutput ? DSPConnection maybe?
Thanks again.

  • You must to post comments
0
0

[code:18iokqq5]
FMOD_RESULT F_CALLBACK myDSPCallback(FMOD_DSP_STATE dsp_state, float *inbuffer, float *outbuffer, unsigned int length, int inchannels, int outchannels)
{
memcpy(outbuffer, inbuffer, legnth
inchannels*sizeof(float));
}[/code:18iokqq5]

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.