Skip to content

Group functions

Andrea Maric edited this page Jun 15, 2022 · 3 revisions

Group Management

phonixCreateGroup(groupName, parentGroupName)

Returns: N/A

Name Datatype Description
groupName string The name of the group, this string will be used in other functions that take group as a argument.
parentGroupName string The parent of the newly created group, changes to the gain of the parent gain will affect this group, defaults to "master".

Note: The groupName string CAN'T be "master".

phonixSetGroupGain(groupName, gain)

Returns: N/A

Name Datatype Description
groupName string The name of the group you wish to target.
gain real The value you want to set the gain to.

Note: gain should range from 0 to 1.

phonixGetGroupGain(groupName)

Returns: real, the gain of the targeted group.

Name Datatype Description
groupName string The name of the group you wish to target.

phonixGroupStop(groupName, [fadeOut])

Returns: N/A

Name Datatype Description
groupName string The name of the group you wish to target.
fadeOut real The time(in ms) during which the gain will gradually shift to 0, upon reaching 0 the sounds will stop.

Note: if you wish to stop ALL sounds, set the groupName to master.

phonixGroupPause(groupName, [fadeOut])

Returns: N/A

Name Datatype Description
groupName string The name of the group you wish to target.
fadeOut real The time(in ms) during which the gain will gradually shift to 0, upon reaching 0 the sounds will be paused.

Note: if you wish to pause ALL sounds, set the groupName to master.

phonixGroupResume(groupName, [fadeIn])

Returns: N/A

Name Datatype Description
groupName string The name of the group you wish to target.
fadeIn real The time(in ms) during which the gain will gradually shift from 0 to 1.