AudioData
clay.audio.AudioData (Class) → clay.web._WebAudio.WebAudioData
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
app: clay.ClayAccess to the snow runtime
id: StringThe associated id for the data
rate: IntThe sample rate in samples per second
length: IntThe PCM length in samples
duration: FloatThe duration in seconds of the PCM buffer
channels: IntThe number of channels for this data
bitsPerSample: IntThe number of bits per sample for this data
format: AudioFormatThe audio format type of the sample data
isStream: BoolWhether or not this data is a stream of samples
destroyed: BoolWhether or not this data has been destroyed
destroy(): Voidnew(app: clay.Clay, options: AudioDataOptions): Void| Name | Type |
|---|---|
app |
clay.Clay |
options |
AudioDataOptions |
Private Members
| Name | Type |
|---|---|
to |
Int |
| Returns |
|---|
| Bool |
| 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 |
- |