Audio Library

PreviousNext

Example

Overview

The Audio_mixer example was created to show in a easy way what you can do with the audio API and how you can use it.

There's not every function implemented in the example. But the most common ones are there, and with the graphical overview it should be easy for you to understand and handle these options.

In this example, there are all parts of the Audio API included. The main part in the middle are six channels (EM_CHANNEL). You can also group (EM_AUDIO_GROUPS) the channels, to execute a grouping function. On the left side you got a music channel (EM_MUSIC) with a playlist and the right column is the master, which can use a lot of functions from EM_CHANNELS.

Master

The master is the most important part in de Audio_mixer. When the master is not active you can't play any sound or music. Because of that, if you want to play anything, you should first set the master active and put it's volume up.

The functions of the master, play/pause and stop, are allways executed once on all channels even on the music channel. So after start playing from the master you can stop it on the channels self.

By using mute, reverse, fading, or an effect it's different. Whenever on is active you can change the status on the channels but the function will keep active, until you switch it again from the master.

In the master part you also got a save and load function. By using save, you store all the current settings from all the channels, the music channel and also from the master.
By clicking on the load button you reload the last saved settings.

The Volume and the panning are not dominated from the master and n'either from the channels themself. The actual settings are a combination of both.

Music channel

To start playing from the music channel: first set the master ready and then activate the music channel and put it's sound up. Then just click the play button and it will play the first music file from the playlist. To change the file press the forth or back button.

If you want to play your own music from the playlist, just put your music files in the music_directory.

Note: the "r" button in the music channel is not reverse like in the other channels it stands for repeat.

Channels

To start playing from a channel: first set the master ready and then activate the channel and put it's sound up. Then you need to choose a sound file from the combobox and then you can start it by clicking the play button. To change the sound, just stop it from playing and choose an other sound file.

Under the group section you can put the channel into a group. At the beginning all channels are not grouped. That means that every function is independent from the other channels. But when you got two ore more channels in the same group every change you in one of the channels will also take effect to the other.

If you want to play your own sound and be able to click it in the combobox, just put your files in the sound_directory.

Note: The sound file will be always repeated.