SoundData
Description
Table structure used for SlashCo.AudioSystem.PlaySound
Parameters
the identifier of the sound, if nil it will use the soundPath field as the identifier
the tick in which the sound was started, this value is used to synchronize the sound for all players. Defaults to the current tick
the callback function that is called when the channel was created. The channel is given to the callback as the first argument
the distance at which the sound should begin to be hearable, default 0. Close up the sound is fully audible. This allows you to make sounds only audible at a certain distance, meaning if you're closer than this distance, it cannot be heard
a position to play the sound from. If an entity is set it will override this position, however if the entity has not networked yet this ensures the sound starts at the correct position
if set, a hook is called allowing you to add a hook that is executed when a sound is played:
hook.Add("SlashCO:AudioSystem:PlaySound:ExampleGroup", "Example", function(soundData, channel) end)
if true, the channel is deleted once the sound finished playing. This ignores the looping flag and still stops it
For sounds played serverside, this will always be set to true when looping is false.
how many seconds before the ending it should start to fade out, and when it faded out the channel is destroyed
how many seconds after the sound starts it should begin to fade out. Use a negative number to use a time based off the end of the sound instead of the start
forces the sound to play as mono. Preferably use forceStereo since it won't reduce sound quality
forces the sound to play as stereo. This does not truly force stereo, but removes mono or 3D flags if they were set
if set it will use the entity's EyePos instead of falling back to WorldSpaceCenter
if set it will calculate the pan for the channel, giving the sound a fake 3D effect
a ConVar the sound is bound to. When the ConVar is false it will instead play fallbackSoundPath
if set, the entity index is not added to the identifier, allowing the sound to only be played once globally instead of once per entity
if set, the channel won't be removed after the entity attached to the channel is removed
if set, traces are used to change the volume and position based on the environment. Experimental and performance intensive
a string containing all channel groups that should be modified while this channel is playing
the volume multiplier that should be enforced onto all channels in modifyGroup
not implemented. Time in seconds for the volume to fade to the enforced multiplier. Clamped between 0 and 30
a table for the pulse effect. This feature is still experimental and should not be used
to which team the sound should be sent to.
Important Internally this just sets sendToEntity with the table of players.