Audio Library

PreviousNext

Groups

Overview

Groups are very useful to stop several channels at the same time. You may also find the first available channel for example.

Using groups

If you want to use groups, do not use EM_AUDIO_GROUPS or EM_AUDIO_GROUP directly.
Always access groups using EM_CHANNELS, except you really know what you're doing.

When using groups, you may stop all playing channels in the same group together by using stop. This is a lot easier than stopping each channel on its own.

With add_channel from EM_AUDIO_GROUP yo can put a channel to a group. When added, its settings change immediately to the current group ones.

With remove_channel you can remove a channel from a group. It's settings will keep the same, but they're no more dependent from the other channels in the group.

Notes

The fading functions are non-blocking. Please block fading on your own. Otherwise, your application may hang or crash when quitting during a fading event.