s&
newspaperAbout
infoAbout s&box newspaperLatest News published_with_changesChanges mapRoadmap monitoringMetrics
gamesGames
sports_esportsBrowse Games rocketDiscover Games
business_centerWorkshop
sports_esportsGames landscapeMaps chairModels textureMaterials apparelClothing constructionMore..
forumForum docsDocs
docsDocumentation dashboardApi Reference schoolTutorials
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
SoundFile
chevron_left Classes
class
SoundFile

Properties

data_objectBitsPerSampledata_objectBytesPerSampledata_objectChannelsdata_objectDurationdata_objectFormatdata_objectIsLoadeddata_objectIsValiddata_objectIsValidForPlaybackdata_objectOnSoundReloadeddata_objectRatedata_objectSampleFrameSize

Methods

lockFinalizefunctionsGetSamplesAsyncfunctionsLoadAsyncfunctionsPreload

Static Methods

functionsFromMp3functionsFromOggfunctionsFromPcmfunctionsFromWavfunctionsLoad
SoundFile
A sound resource.
class Sandbox .account_tree extends Resource
Sandbox.Engine

data_object Properties 11

BitsPerSample
int
Bits per each sample of this sound file.
BytesPerSample
int
Bytes per each sample of this sound file.
Channels
int
Number of channels this audio file has.
Duration
float
Duration of the sound this sound file contains, in seconds.
Format
SoundFormat
Format of the audio file.
IsLoaded
bool
true if sound is loaded
IsValid
bool
IsValidForPlayback
bool
OnSoundReloaded
Action
Ran when the file is reloaded/recompiled, etc.
Rate
int
Sample rate of this sound file, per second.
SampleFrameSize
int
Size of one sample, typically this would be "sample size * channel count", but can vary on audio format.

functions Methods 4

Finalize ()
GetSamplesAsync ()
Task`1
Request decompressed audio samples.
LoadAsync ()
Task`1
Preload ()

functions Static Methods 5

FromMp3 (filename, data, options)
SoundFile
FromOgg (filename, data, options)
SoundFile
FromPcm (filename, data, options)
SoundFile
FromWav (filename, data, options)
SoundFile
Load (filename)
SoundFile
Load a new sound from disk. Includes automatic caching.

Inheritance

Resource
SoundFile
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.
  • News
  • Docs
  • Metrics
  • FAQ
  • Forum
  • Discord
  • Twitter