ArrayAudioSource
Audio source that supplies PCM samples on demand.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ArrayAudioSource( data: | number[] | Float32Array<ArrayBufferLike> | Float32Array<ArrayBufferLike>[] | number[][], sampleRate: number, id?: string): ArrayAudioSource;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
data | | number[] | Float32Array<ArrayBufferLike> | Float32Array<ArrayBufferLike>[] | number[][] |
sampleRate | number |
id? | string |
Returns
Section titled “Returns”ArrayAudioSource
Properties
Section titled “Properties”Methods
Section titled “Methods”getChannelData()
Section titled “getChannelData()”getChannelData(channel: number): Float32Array;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
channel | number |
Returns
Section titled “Returns”Float32Array
read()
Section titled “read()”read(options: object): Float32Array;Reads PCM samples for a specific channel and time range.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
options | { channel: number; endTime: number; startTime: number; } | Channel index and time span in seconds. |
options.channel | number | - |
options.endTime | number | - |
options.startTime | number | - |
Returns
Section titled “Returns”Float32Array
Float32Array of normalized audio samples.