class SoundFile : Resource

book_4_sparkGenerated
code_blocksInput

Description

The SoundFile class represents a sound resource in the Sandbox environment. It provides methods and properties to manage and interact with sound files, including loading, preloading, and retrieving audio samples.

Members

Static Methods

Member NameSummary
LoadLoads a sound file from the specified filename.

Instance Methods

Member NameSummary
LoadAsyncAsynchronously loads the sound file.
PreloadPreloads the sound file for faster access.
GetSamplesAsyncRequest decompressed audio samples.

Properties

Member NameSummary
OnSoundReloadedRan when the file is reloaded/recompiled, etc.
IsLoadedtrue if sound is loaded
FormatFormat of the audio file.
BitsPerSampleBits per each sample of this sound file.
ChannelsNumber of channels this audio file has.
BytesPerSampleBytes per each sample of this sound file.
SampleFrameSizeSize of one sample, typically this would be "sample size * channel count", but can vary on audio format.
RateSample rate of this sound file, per second.
DurationDuration of the sound this sound file contains, in seconds.
IsValidIndicates if the sound file is valid.
IsValidForPlaybackIndicates if the sound file is valid for playback.