AudioData

clay.audio.AudioData (Class) → clay.soloud.SoloudAudioData

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.

Instance Members

Access to the snow runtime


The associated id for the data


rate: Int

The sample rate in samples per second


length: Int

The PCM length in samples


duration: Float

The duration in seconds of the PCM buffer


channels: Int

The number of channels for this data


bitsPerSample: Int

The number of bits per sample for this data


format: AudioFormat

The audio format type of the sample data


isStream: Bool

Whether or not this data is a stream of samples


destroyed: Bool

Whether or not this data has been destroyed


destroy(): Void

new(app: clay.Clay, options: AudioDataOptions): Void
Name Type
app clay.Clay
options AudioDataOptions

Private Members

seek(to: Int): Bool
Name Type
to Int
Returns
Bool

portion(into: clay.buffers.Uint8Array, start: Int, len: Int, intoResult: Array<Int>): Array<Int>
Name Type
into clay.buffers.Uint8Array
start Int
len Int
intoResult Array<Int>
Returns
Array<Int>

toString(): String
Returns
String

Metadata

Name Parameters
:allow clay.audio.AudioInstance
:structInit -