s&
newspaper
About
info
About s&box
newspaper
Latest News
published_with_changes
Changes
map
Roadmap
monitoring
Metrics
games
Games
sports_esports
Browse Games
rocket
Discover Games
business_center
Workshop
sports_esports
Games
landscape
Maps
chair
Models
texture
Materials
apparel
Clothing
construction
More..
forum
Forum
docs
Docs
docs
Documentation
dashboard
Api Reference
school
Tutorials
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
Classes
MusicPlayer
chevron_left
Classes
class
MusicPlayer
search
Properties
data_object
Amplitude
data_object
Channels
data_object
Distance
data_object
Duration
data_object
Falloff
data_object
LipSync
data_object
ListenLocal
data_object
OnFinished
data_object
OnRepeated
data_object
Paused
data_object
PlaybackTime
data_object
Position
data_object
Repeat
data_object
SampleRate
data_object
Spectrum
data_object
TargetMixer
data_object
Title
data_object
Visemes
data_object
Volume
Methods
functions
Dispose
functions
Seek
functions
Stop
Static Methods
functions
Play
functions
PlayUrl
MusicPlayer
Enables music playback. Use this for music, not for playing game sounds.
class
Sandbox
.
sealed
Sandbox.Engine
data_object
Properties
19
Amplitude
float
Approximate measure of audio loudness.
Channels
int
Number of channels of the audio being played.
Distance
float
Duration
float
Gets the total duration of the video in seconds.
Falloff
Curve
LipSync
bool
Enables lipsync processing.
ListenLocal
bool
Place the listener at 0,0,0 facing 1,0,0.
OnFinished
Action
Invoked when the audio has finished playing.
OnRepeated
Action
Invoked when the audio has repeated.
Paused
bool
Pause playback of audio.
PlaybackTime
float
Gets the current playback time in seconds.
Position
Vector3
Position of the sound.
Repeat
bool
Audio will repeat when reaching the end.
SampleRate
int
Sample rate of the audio being played.
Spectrum
ReadOnlySpan`1
512 FFT magnitudes used for audio visualization.
TargetMixer
Mixer
Which mixer do we want to write to
Title
string
Get title of the track.
Visemes
IReadOnlyList`1
A list of 15 lipsync viseme weights. Requires Sandbox.MusicPlayer.LipSync to be enabled.
Volume
float
Change the volume of this music.
functions
Methods
3
Dispose
(
)
Seek
(
time
)
Sets the playback position to a specified time in the audio, given in seconds.
Stop
(
)
Stops audio playback.
functions
Static Methods
2
Play
(
filesystem
,
path
)
MusicPlayer
Plays a music file from a relative path.
PlayUrl
(
url
)
MusicPlayer
Plays a music stream from a URL.
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.