SoundGroup::setMaxAudible

FMOD Studio API

Firelight Technologies FMOD Studio API

SoundGroup::setMaxAudible

Limits the number of concurrent playbacks of sounds in a sound group to the specified value.
After this, if the sounds in the sound group are playing this many times, any attepts to play more of the sounds in the sound group will by default fail with FMOD_ERR_MAXAUDIBLE.
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.

C++ Syntax

FMOD_RESULT SoundGroup::setMaxAudible(
  int maxaudible
);

C Syntax

FMOD_RESULT FMOD_SoundGroup_SetMaxAudible(
  FMOD_SOUNDGROUP *soundgroup,
  int maxaudible
);

C# Syntax

RESULT SoundGroup.setMaxAudible(
  int maxaudible
);

JavaScript Syntax

SoundGroup.setMaxAudible(
  maxaudible                       
);

Parameters

maxaudible
Number of playbacks to be audible at once. -1 = unlimited. 0 means no sounds in this group will succeed. Default = -1.

Return Values

If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the FMOD_RESULT enumeration.

Remarks

SoundGroup::getNumPlaying can be used to determine how many instances of the sounds in the sound group are currently playing.

See Also




Version 1.10.03 Built on Feb 1, 2018