Sound::setSoundGroup

FMOD Studio API

Firelight Technologies FMOD Studio API

Sound::setSoundGroup

Moves the sound from its existing SoundGroup to the specified sound group.

C++ Syntax

FMOD_RESULT Sound::setSoundGroup(
  FMOD::SoundGroup *soundgroup
);

C Syntax

FMOD_RESULT FMOD_Sound_SetSoundGroup(
  FMOD_SOUND *sound,
  FMOD_SOUNDGROUP *soundgroup
);

C# Syntax

RESULT Sound.setSoundGroup(
  SoundGroup soundgroup
);

JavaScript Syntax

Sound.setSoundGroup(
  soundgroup                       
);

Parameters

soundgroup
Address of a SoundGroup object to move the sound to.

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

By default a sound is located in the 'master sound group'. This can be retrieved with System::getMasterSoundGroup.
Putting a sound in a sound group (or just using the master sound group) allows for functionality like limiting a group of sounds to a certain number of playbacks (see SoundGroup::setMaxAudible).

See Also




Version 1.10.03 Built on Feb 1, 2018