C4 Engine
C4 Engine API Documentation

class SoundGroup

Defined in:  C4Sound.h
Represents a sound group.
Definition

class SoundGroup : public MapElement<SoundGroup>, public LinkTarget<SoundGroup>

Member Functions
SoundGroup::GetSoundGroupType Returns the sound group type.
SoundGroup::GetSoundGroupName Returns the sound group type.
SoundGroup::GetVolume Returns the volume of a sound group.
SoundGroup::SetVolume Sets the volume of a sound group.
SoundGroup::GetFrequency Returns the frequency of a sound group.
SoundGroup::SetFrequency Sets the frequency of a sound group.
Constructor

SoundGroup(SoundGroupType type, const char *name);

Parameters
type The unique type of the sound group.
name A pointer to the name of the sound group.
Description
The SoundGroup class represents a group to which sounds may belong. The volume for an entire group can be modified using the SoundGroup::SetVolume function, and this volume is applied in addition to each sound's internal volume and the Sound Manager's master volume. The frequency for an entire group can be modified using the SoundGroup::SetFrequency function, and this frequency is applied in addition to each sound's internal frequency.

Every sound group must have a unique 32-bit identifier specified by the type parameter. The name parameter specifies the human-readable group name that is displayed in the World Editor.

A sound group can be registered so that it appears in the World Editor by calling the SoundMgr::RegisterSoundGroup function. A default sound group to which each sound initially belongs can be set by calling the SoundMgr::SetDefaultSoundGroup function.
Base Classes
MapElement<SoundGroup> Sound group objects are stored in a map using the type as a key.
LinkTarget<SoundGroup> Used internally by the Sound Manager.
See Also

Sound::GetSoundGroup

Sound::SetSoundGroup

SoundMgr::GetDefaultSoundGroup

SoundMgr::SetDefaultSoundGroup

SoundMgr::RegisterSoundGroup