Garry's Mod Wiki

CSoundPatch

CSoundPatch class.

Created with CreateSound

Methods

CSoundPatch:ChangePitch( number pitch, number deltaTime = 0 )
Adjust the pitch, alias the speed at which the sound is being played. This invokes the GM:EntityEmitSound.
CSoundPatch:ChangeVolume( number volume, number deltaTime = 0 )
Adjusts the volume of the sound played. Appears to only work while the sound is being played.
CSoundPatch:FadeOut( number seconds )
Fades out the volume of the sound from the current volume to 0 in the given amount of seconds.
number CSoundPatch:GetDSP()
Returns the DSP ( Digital Signal Processor ) effect for the sound.
number CSoundPatch:GetPitch()
Returns the current pitch.
number CSoundPatch:GetSoundLevel()
Returns the current sound level.
number CSoundPatch:GetVolume()
Returns the current volume.
boolean CSoundPatch:IsPlaying()
Returns whenever the sound is being played.
CSoundPatch:Play()
Starts to play the sound.
CSoundPatch:PlayEx( number volume, number pitch )
Same as CSoundPatch:Play but with 2 extra arguments allowing to set volume and pitch directly.
CSoundPatch:SetDSP( number dsp )
Sets the DSP (Digital Signal Processor) effect for the sound. Similar to Player:SetDSP but for individual sounds. This will only apply if the sound is not playing.
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.

Page Links


Special Pages


Wikis

?

Render Time: 30ms

Session 0
DB GetPage 2
Generate Html 6
SaveChanges 9
Render Body 0
Render Sidebar 11