CSoundPatch
CSoundPatch class.
Created with CreateSound
Methods
Adjust the pitch, also known as the speed at which the sound is being played.
Appears to only work while the sound is being played. See also CSoundPatch:PlayEx.
This invokes GM:EntityEmitSound.
Adjusts the volume of the sound played.
Appears to only work while the sound is being played. See also CSoundPatch:PlayEx.
Fades out the volume of the sound from the current volume to 0 in the given amount of seconds.
number CSoundPatch:GetSoundLevel()
Returns the current sound level.
CSoundPatch:Play()
Starts to play the sound. This will reset the sound's volume and pitch to their default values. See CSoundPatch:PlayEx
Same as CSoundPatch:Play but with 2 extra arguments allowing to set volume and pitch directly.
Sets the DSP (Digital Signal Processor) effect for the sound.
Similar to Player:SetDSP but for individual sounds.
CSoundPatch:SetSoundLevel( number level )
Sets the sound level in decibel.
CSoundPatch:Stop()
Stops the sound from being played.
This will not work if the entity attached to this sound patch (specified by CreateSound) is invalid.Issue Tracker: 3260
Garry's Mod
Rust
Steamworks
Wiki Help