# Example for the C Api

**URL:** <https://qa.fmod.com/t/example-for-the-c-api/12632>\
**Category:** FMOD Studio\
**Created:** [August 5, 2016, 7:26pm UTC](https://qa.fmod.com/t/example-for-the-c-api/12632 "2016-08-05T19:26:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luisoncpp](https://avatars.discourse-cdn.com/v4/letter/l/91b2a8/32.png) [@luisoncpp](https://qa.fmod.com/u/luisoncpp)\
**Post date:** [August 5, 2016, 7:26pm UTC](https://qa.fmod.com/t/example-for-the-c-api/12632/1 "2016-08-05T19:26:57Z")

</div>

Hi everyone, I’m going to use FMod win Mingw64, I read that I can use the DLLs directly without the import lib as long as I use the C api instead of the C++.  
I was checking in the examples folder of the API and all the examples are in C++.  
Is there any downloadable example for the C Api that I can use to start compiling?

---

<div class="post-metadata">

**Author:** ![brett](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/brett/32/261_2.png) [@brett](https://qa.fmod.com/u/brett)\
**Post date:** [August 8, 2016, 12:13am UTC](https://qa.fmod.com/t/example-for-the-c-api/12632/2 "2016-08-08T00:13:38Z")

</div>

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);
```
