FMOD Engine User Manual 2.03
An interface that manages Sound Groups
Group Functions:
Sound Functions:
General:
Values specifying behavior when a sound group's max audible value is exceeded.
typedef enum FMOD_SOUNDGROUP_BEHAVIOR {
FMOD_SOUNDGROUP_BEHAVIOR_FAIL,
FMOD_SOUNDGROUP_BEHAVIOR_MUTE,
FMOD_SOUNDGROUP_BEHAVIOR_STEALLOWEST,
FMOD_SOUNDGROUP_BEHAVIOR_MAX
} FMOD_SOUNDGROUP_BEHAVIOR;
When using FMOD_SOUNDGROUP_BEHAVIOR_MUTE, SoundGroup::setMuteFadeSpeed can be used to stop a sudden transition.
Instead, the time specified will be used to cross fade between the sounds that go silent and the ones that become audible.
See Also: SoundGroup::setMaxAudibleBehavior, SoundGroup::getMaxAudibleBehavior, SoundGroup::setMaxAudible, SoundGroup::getMaxAudible, SoundGroup::setMuteFadeSpeed, SoundGroup::getMuteFadeSpeed
Retrieves the maximum number of playbacks to be audible at once in a sound group.
FMOD_RESULT SoundGroup::getMaxAudible(
int *maxaudible
);
Maximum number of playbacks to be audible at once.
See Also: SoundGroup::setMaxAudible
Retrieves the current max audible behavior.
FMOD_RESULT SoundGroup::getMaxAudibleBehavior(
FMOD_SOUNDGROUP_BEHAVIOR *behavior
);
SoundGroup max playbacks behavior. (FMOD_SOUNDGROUP_BEHAVIOR)
See Also: SoundGroup::setMaxAudibleBehavior
Retrieves the current mute fade time.
FMOD_RESULT SoundGroup::getMuteFadeSpeed(
float *speed
);
Fade time. 0 = no fading.
See Also: SoundGroup::setMuteFadeSpeed
Retrieves the name of the sound group.
FMOD_RESULT SoundGroup::getName(
char *name,
int namelen
);
Length of name.
See Also: System::createSoundGroup
Retrieves the number of currently playing Channels for the SoundGroup.
FMOD_RESULT SoundGroup::getNumPlaying(
int *numplaying
);
This routine returns the number of Channels playing. If the SoundGroup only has one Sound, and that Sound is playing twice, the figure returned will be two.
See Also: System::createSoundGroup, System::getMasterSoundGroup
Retrieves the current number of sounds in this sound group.
FMOD_RESULT SoundGroup::getNumSounds(
int *numsounds
);
See Also: SoundGroup::getSound
Retrieves a sound.
FMOD_RESULT SoundGroup::getSound(
int index,
Sound **sound
);
Use SoundGroup::getNumSounds in conjunction with this function to enumerate all sounds in a SoundGroup.
See Also: System::createSound
Retrieves the parent System object.
FMOD_RESULT SoundGroup::getSystemObject(
System **system
);
See Also: System::createSoundGroup, System::getMasterSoundGroup
Retrieves a user value associated with this object.
FMOD_RESULT SoundGroup::getUserData(
void **userdata
);
This function allows arbitrary user data to be retrieved from this object. See the User Data section of the glossary for an example of how to get and set user data.
Retrieves the volume of the sound group.
FMOD_RESULT SoundGroup::getVolume(
float *volume
);
Volume level.
See Also: SoundGroup::setVolume
Releases a soundgroup object and returns all sounds back to the master sound group.
FMOD_RESULT SoundGroup::release();
You cannot release the master SoundGroup.
See Also: System::createSoundGroup, System::getMasterSoundGroup
Sets the maximum number of playbacks to be audible at once in a sound group.
FMOD_RESULT SoundGroup::setMaxAudible(
int maxaudible
);
Maximum number of playbacks to be audible at once. -1 denotes unlimited.
If playing instances of sounds in this group equal or exceed number specified here, attepts to play more of the sounds with be met with FMOD_ERR_MAXAUDIBLE by default.
Use SoundGroup::setMaxAudibleBehavior to change the way the sound playback behaves when too many sounds are playing. Muting, failing and stealing behaviors can be specified. See FMOD_SOUNDGROUP_BEHAVIOR.
SoundGroup::getNumPlaying can be used to determine how many instances of the sounds in the SoundGroup are currently playing.
See Also: SoundGroup::getMaxAudible, SoundGroup::setMaxAudibleBehavior, SoundGroup::getMaxAudibleBehavior
This function changes the way the sound playback behaves when too many sounds are playing in a soundgroup.
FMOD_RESULT SoundGroup::setMaxAudibleBehavior(
FMOD_SOUNDGROUP_BEHAVIOR behavior
);
SoundGroup max playbacks behavior. (FMOD_SOUNDGROUP_BEHAVIOR)
See Also: SoundGroup::getMaxAudibleBehavior, SoundGroup::setMaxAudible, SoundGroup::getMaxAudible
Sets a mute fade time.
FMOD_RESULT SoundGroup::setMuteFadeSpeed(
float speed
);
Fade time. 0 = no fading.
If a mode besides FMOD_SOUNDGROUP_BEHAVIOR_MUTE is used, the fade speed is ignored.
When more sounds are playing in a SoundGroup than are specified with SoundGroup::setMaxAudible, the least important Sound (ie lowest priority / lowest audible volume due to 3D position, volume etc) will fade to silence if FMOD_SOUNDGROUP_BEHAVIOR_MUTE is used, and any previous sounds that were silent because of this rule will fade in if they are more important.
See Also: SoundGroup::getMuteFadeSpeed
Sets a user value associated with this object.
FMOD_RESULT SoundGroup::setUserData(
void *userdata
);
This function allows arbitrary user data to be attached to this object. See the User Data section of the glossary for an example of how to get and set user data.
See Also: SoundGroup::getUserData
Sets the volume of the sound group.
FMOD_RESULT SoundGroup::setVolume(
float volume
);
Volume level.
Scales the volume of all Channels playing Sounds in this SoundGroup.
See Also: SoundGroup::getVolume
Stops all sounds within this soundgroup.
FMOD_RESULT SoundGroup::stop();
See Also: System::playSound