SoundGroup

A sound group allows you to categorize a series of SoundSource Object and consolidate them together into a single group. Once in a sound group, all SoundSource additional functionalities are available such as controlling their playback state them all at once using a single function call.

To visually identify all members of a SoundGroup a unique color can be specified and will be used as highlight inside the 3d viewport. In addition the visibility of all the group members can be toggled on or off quickly all at once in a similar fashion as the playback controls.

See Also

Static Variables


Name Description
scene Parent Scene where the SoundGroup is defined.
soundsource_count Total amount of SoundSource contained in the SoundGroup.
uid Unique id to identify the SoundGroup globally.

Variables


Name Description
option PresetOption to apply to the SoundGroup.
name Unique name to identify the SoundGroup within its parent Scene.
gain Amount of gain applied to the SoundGroup.
color Color to visually identify the SoundSource that belongs to the active SoundGroup within the editor 3d viewport.

Functions


Name Description
Play Start the playback of all SoundSource contained in the current SoundGroup.
Pause Pause all SoundSource contained in the SoundGroup.
Stop Stop the playback of all SoundSource contained in the active SoundGroup.
AddSoundSource Append a new SoundSource to the active SoundGroup.
GetSoundSource Retrieve the reference of a SoundSource connected to the active SoundGroup by name.
GetSoundSourceAt Retrieve a specific SoundSource maintained by the active SoundGroup by index.
GetSoundSourceIndex Return the internal index of a specific SoundSource connected to the current SoundGroup.
RemoveSoundSource Remove a SoundSource from the active SoundGroup.
RemoveSoundSourceAt Remove a specific SoundSource from the group using its index.
SelectAll Select all SoundSource Object contained in the active SoundGroup.
DeselectAll Deselect all SoundSource contained in the active SoundGroup.
IsSelected Helper that returns wheter or not all SoundSource associated with the active SoundGroup are selected.
ShowAll Toggle the visibility of all SoundSource connected to the active SoundGroup.
HideAll Hide all SoundSource contained in the current SoundGroup.
IsVisible Helper function that returns wheter or not all SoundSource connected to the active SoundGroup are visible or not.

PresetOption


List of all available preset options.

  • kNothing: No special present option is applied.
  • kMute: Override any gain settings applied and set the volume to 0%.
  • kSolo: Override any gain settings applied and crank up the volume to 100%.
  • kBypass: Override all gain settings and use the current value assigned to the SoundSource or SoundGroup.




NRG - API 2022.4.384543 - Fri Nov 4 2022
Copyright © 2022 nrgcore.com. All Rights Reserved. Terms of Service - Privacy Policy - EULA