s&
info
About
info
About s&box
newspaper
Latest News
published_with_changes
Changes
map
Roadmap
monitoring
Metrics
games
Games
sports_esports
Browse Games
explore
Discover Games
category
Workshop
sports_esports
Games
landscape
Maps
view_in_ar
Models
texture
Materials
apparel
Clothing
construction
More..
forum
Forum
menu_book
Learn
docs
Documentation
api
Api Reference
school
Tutorials
manage_search
Code Search
input
Log in with Steam
chevron_left
Change Language
简体中文
English
Русский
Español
Português-Brasil
Deutsch
日本語
Français
Polski
Türkçe
한국어
Pirate
Italiano
ไทย
繁體中文
Українська
Čeština
Nederlands
Magyar
Dansk
Suomi
Svenska
Norsk
Ελληνικά
Română
Български
Tiếng Việt
Bahasa Indonesia
Español-Latinoamérica
العربية
Api
Audio
SoundHandle
chevron_left
Audio
class
SoundHandle
Properties
data_object
AirAbsorption
data_object
Amplitude
remove_circle
Decibels
data_object
Distance
data_object
DistanceAttenuation
remove_circle
ElapsedTime
data_object
Fadein
data_object
Fadeout
data_object
Falloff
data_object
Finished
data_object
FollowParent
data_object
IsPlaying
data_object
IsStopped
data_object
IsValid
data_object
LipSync
data_object
ListenLocal
data_object
LocalTransform
data_object
Loopback
data_object
Name
remove_circle
Occlusion
data_object
OcclusionEnabled
remove_circle
OcclusionRadius
data_object
Parent
data_object
Paused
data_object
Pitch
data_object
Position
remove_circle
Reflections
data_object
Reverb
data_object
ReverbEnabled
data_object
Rotation
data_object
SampleRate
data_object
SpacialBlend
data_object
TargetMixer
data_object
Time
data_object
Transform
data_object
Transmission
data_object
Volume
Methods
remove_circle
ClearParent
functions
Dispose
lock
Finalize
remove_circle
SetParent
functions
Stop
remove_circle
Update
Static Methods
functions
GetActive
SoundHandle
A handle to a sound that is currently playing. You can use this to control the sound's position, volume, pitch etc.
class
Sandbox
.
Sandbox.Engine
data_object
Properties
37
AirAbsorption
bool
Should the sound get absorbed by air, so it sounds different at distance
Amplitude
float
Measure of audio loudness.
Decibels
obsolete
float
Distance
float
How many units the sound can be heard from.
DistanceAttenuation
bool
Should the sound fade out over distance
ElapsedTime
obsolete
float
Fadein
Curve
The fadein curve for when the sound starts.
Fadeout
Curve
The fadeout curve for when the sound stops.
Falloff
Curve
The falloff curve for the sound.
Finished
bool
Sound is done
FollowParent
bool
Update our position every frame relative to our parent
IsPlaying
bool
Whether the sound is currently playing or not.
IsStopped
bool
True if the sound has been stopped
IsValid
bool
LipSync
LipSyncAccessor
Access lipsync processing.
ListenLocal
bool
Place the listener at 0,0,0 facing 1,0,0.
LocalTransform
Transform
If we're following a parent, our position will be this relative to them.
Loopback
bool
If true, then this sound won't be played unless voice_loopback is 1. The assumption is that it's the local user's voice. Amplitude and visme data will still be available!
Name
string
A debug name to help identify the sound
Occlusion
obsolete
bool
Legacy alias for Sandbox.SoundHandle.OcclusionEnabled.
OcclusionEnabled
bool
Allow this sound to be occluded by geometry etc
OcclusionRadius
obsolete
float
Legacy occlusion radius setting. No longer used by the simulation.
Parent
GameObject
If set with a parent and
is true, we will update our position to match the parent's world position. You can use
to set an offset from the parent's position. Setting a parent also allows you to use GameObject.StopAllSounds on the parent to stop all sounds that are following it. This is set automatically when calling
on a GameObject, but you can set it manually if you want to change the parent of an existing sound handle.
Paused
bool
Whether the sound is currently paused or not.
Pitch
float
Pitch of the sound.
Position
Vector3
Position of the sound.
Reflections
obsolete
bool
Legacy alias for Sandbox.SoundHandle.ReverbEnabled.
Reverb
float
How much this sound contributes to room reverb. 1 = full reverb, 0 = completely dry.
ReverbEnabled
bool
Enable reverb simulation for this sound (reflections/late reverb).
Rotation
Rotation
The direction the sound is facing
SampleRate
int
How many samples per second?
SpacialBlend
float
How 3d the sound should be. 0 means no 3d, 1 means fully
TargetMixer
Mixer
Which mixer do we want to write to
Time
float
The current time of the playing sound in seconds. Note: for some formats seeking may be expensive, and some may not support it at all.
Transform
Transform
This sound's transform
Transmission
bool
Legacy transmission toggle. Transmission is now derived from occlusion and material response.
Volume
float
Volume of the sound.
functions
Methods
6
ClearParent
(
)
obsolete
Clear our parent - stop following
Dispose
(
)
Finalize
(
)
SetParent
(
obj
)
obsolete
Tell the SoundHandle to follow this GameObject's position
Stop
(
fadeTime
)
Update
(
)
obsolete
Called to push changes to a sound immediately, rather than waiting for the next tick. You should call this if you make changes to a sound.
functions
Static Methods
1
GetActive
(
handles
)
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.