s&
About
The Project
infoAbout s&box mapRoadmap monitoringMetricsEngine startup and usage numbers
Updates
newspaperLatest News published_with_changesChangesRelease-by-release changelog
Games
Browse Games Discover Games
gamejamslive now

Game Jam III

Ends Fri 25 Sep
ThemeOne More Round

The jam is running. Build something, or play the entries.

£50,000
prizepool
View the jam
Workshop
Playable
sports_esportsGamesStandalone games and gamemodes
Assets
landscapeMaps view_in_arModels textureMaterials apparelClothing
appsEverythingEvery asset type in one list
Forum
Learn
Documentation
rocket_launchGetting Started docsDocumentation apiAPI Reference
Resources
schoolTutorials manage_searchCode Search
inputLog in with Steam chevron_leftChange Language
简体中文EnglishРусскийEspañolPortuguês-BrasilDeutsch日本語FrançaisPolskiTürkçe한국어PirateItalianoไทย繁體中文УкраїнськаČeštinaNederlandsMagyarDanskSuomiSvenskaNorskΕλληνικάRomânăБългарскиTiếng ViệtBahasa IndonesiaEspañol-Latinoaméricaالعربية
Api
Classes
MusicPlayer
chevron_left Classes
class
MusicPlayer

Properties

data_objectAmplitudedata_objectChannelsdata_objectDistancedata_objectDurationdata_objectFalloffdata_objectLipSyncdata_objectListenLocaldata_objectOnFinisheddata_objectOnRepeateddata_objectPauseddata_objectPlaybackTimedata_objectPositiondata_objectRepeatdata_objectSampleRatedata_objectSpectrumdata_objectTargetMixerdata_objectTitledata_objectVisemesdata_objectVolume

Methods

functionsDisposefunctionsSeekfunctionsStop

Static Methods

functionsPlayfunctionsPlayUrl
MusicPlayer
Enables music playback. Use this for music, not for playing game sounds.
class Sandbox .
sealedSandbox.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.
Facepunch
  • News
  • Docs
  • Metrics
  • FAQ
  • Forum
  • Discord
  • Twitter