FMOD Core API Examples

Play Stream

Play Stream

This example shows how to simply play a stream such as an MP3 or WAV. This makes FMOD decode the file in realtime as it plays, instead of loading it all at once which uses far less memory in exchange for a small runtime CPU hit.

Play Sound

Play Sound

This example shows how to simply load and play multiple sounds, the simplest usage of FMOD. By default FMOD will decode the entire file into memory when it loads.

3D Sound

3D Sound

This example shows how to basic 3D positioning of sounds.

Convolution Reverb

Convolution Reverb

This example shows how to set up a convolution reverb DSP as a global DSP unit that can be routed into by multiple seperate channels. Convolution reverb uses data from a real world locations called an "Impulse Response" to model the reflection of audio waves back to a listener.

Effects

Effects

This example shows how to apply some of the built in software effects to sounds by applying them to the master channel group. All software sounds played here would be filtered in the same way.

Channel Groups

Channel Groups

This example shows how to put channels into channel groups, so that you can affect a group of channels at a time instead of just one.

Generate Tone

Generate Tone

This example shows how to play generated tones using System::playDSP instead of manually connecting and disconnecting DSP units.

DSP Effect Per Speaker

DSP Effect Per Speaker

This example shows how to manipulate a DSP network and as an example, creates 2 DSP effects, splitting a single sound into 2 audio paths, which it then filters seperately.

Gapless Playback

Gapless Playback

This example shows how to schedule channel playback into the future with sample accuracy. Use several scheduled channels to synchronize 2 or more sounds.

Multiple Speaker

Multiple Speaker

This example shows how to play sounds in multiple speakers, and also how to even assign sound subchannels, such as those in a stereo sound to different individual speakers.

DSP Custom

DSP Custom

This example shows how to manipulate a DSP network and as an example, creates 2 DSP effects, splitting a single sound into 2 audio paths, which it then filters seperately.

Granular Synth

Granular Synth

This example shows how you can play a string of sounds together without gaps, using the setDelay command, to produce a granular synthesis style truck engine effect.

User Created Sound

User Created Sound

This example shows how create a sound with data filled by the user. It shows a user created static sample, followed by a user created stream. The former allocates all memory needed for the sound and is played back as a static sample, while the latter streams the data in chunks as it plays, using far less memory.

Load From Memory

Load From Memory

This example is simply a variant of the Play Sound Example, but it loads the data into memory then uses the 'load from memory' feature of System::createSound.