Logo


search API (or start typing anywhere)


AudioData

snow.types.AudioData defined in snow.types.Types

An audio data object contains information about audio samples or streams, ready to be used. AudioData objects typically come from the app.assets.audio API or app.audio.module.data_from_path, since the implemenation details of decoding audio and streams are module level implementation details. This is stored by AudioSource and AssetAudio objects for example.


class
meta: @:allow(snow.systems.audio.AudioInstance)


 

Members


app
app : snow.Snow
Access to the snow runtime
channels
channels : Int
The number of channels for this data
format
format : snow.types.AudioFormatType
The audio format type of the sample data
id
id : String
The associated id for the data
is_stream
is_stream : Bool
Whether or not this data is a stream of samples
length
length : Int
The PCM length in samples
rate
rate : Int
The sample rate in samples per second
samples
samples : snow.api.buffers.Uint8Array
The sample data bytes, if any (streams don’t populate this)

Methods


destroy
destroy() : Void

newinline

new(_app:snow.Snow, _options:snow.types.AudioDataOptions) : Void