FMOD Sound System

This tutorial will unfortunatly only work for C#. Other languages however can be used with FMOD. You will require the following installs and additional files to get you started.

Required Download

Additional Links


Basic Setup

After downloading from the links above extract the FMODINSTALL.ZIP and run the exe as per standard install. Copy the FMOD folder from the FMOD.ZIP file to your project folder. Add the folder to your project and its contects by right clicking on your project name select Add\Existing Item now browse to the FMOD folder and add the following 3 files to your project.


You are now ready to use the FMOD sound system


We need to access the entire FMOD sound system add the following variables to the top of your project

//FMOD Sound
private FMOD.System fmodsystem = null;
private FMOD.Channel fmodchannel = null;
private bool playing = false;
private FMOD.Sound fmodsound = null;
  • FMOD.System FMOD Core
  • FMOD.Channel A sound channel that you can use to change you sound settings
  • bool playing Is our sound playing or not?
  • FMOD.Sound The actual sound that is being played

I always create a InitSound function that i call from the Form_Load

private void frmMain_Load(object sender, EventArgs e)

here is the InitSound function which can be placed just after the Form_Load function. you may at this point wish to add a Sound folder to your project Bin\Debug folder for storing the wav files.

private void InitSound()
    //Create FMOD System
    FMOD.Factory.System_Create(ref fmodsystem);
    //Initialise FMOD
    fmodsystem.init(32, FMOD.INITFLAG.NORMAL, (IntPtr)null);
    //Create Sounds
    fmodsystem.createSound(@"Sound\beep.wav", FMOD.MODE.HARDWARE, ref fmodsound);

Here we have created the reference to the FMOD system then Initialised the fmodsystem variable to use 32 sound channels. The last part is that we will create the sound we wish to play in this case Beep.wav from our Sound folder.

Playing A Sound

We have now setup our FMOD system initialised it and loaded a WAV file to play (beep.wav). now all we need it to actually play the sound. Add the following code where you would like the sound to play (A button or a keypress will do).

if (fmodchannel != null)
    fmodchannel.isPlaying(ref playing);
if (!playing)
    fmodsystem.playSound(FMOD.CHANNELINDEX.FREE, fmodsound, false, ref fmodchannel);

The first part here is to check that the sound channel has actually been created, if it has then we need to check if the channel is actually playing a sound. If we try playing a sound and then play the sound again in the same channel you may experience bad sound or even lock ups. If our sound is NOT playing then we can go ahead and play the sound. NOTE that fmodsound is used from our InitSound function and the fmodchannel is created when a new sound is to be played. You MUST use a channel per sound otherwise you may experience problems again bad sound or even lock ups.


Hope this small tutorial gave you some idea of how to use FMOD i am no expert but like to pass on what i have struggled to learn. Please post any problems on the forum all comments are welcome. Thank you for reading this tutorial. Now make some noise.....

tutorialsarticlesandexamples/fmod.txt · Last modified: 2013/11/22 13:32