Example for the C Api

Hi Luis,
The C usage is nearly identical to the C++ usage, you just put the object as the first parameter, and use the FMOD_(classname)_ prefix in front of the function name.

ie

result = system->createDSPByType(FMOD_DSP_TYPE_OSCILLATOR, &dsp);
ERRCHECK(result);
result = dsp->setParameterFloat(FMOD_DSP_OSCILLATOR_RATE, 440.0f); 
ERRCHECK(result);

becomes

result = FMOD_System_CreateDSPByType(system, FMOD_DSP_TYPE_OSCILLATOR, &dsp);
ERRCHECK(result);
result = FMOD_DSP_SetParameterFloat(dsp, FMOD_DSP_OSCILLATOR_RATE, 440.0f); /* Musical note 'A' */
ERRCHECK(result);
1 Like