getByteTimeDomainData
Summary
Copies the current time-domain (waveform) data into the passed unsigned byte array. If the array has fewer elements than the frequencyBinCount, the excess elements will be dropped.
Method of apis/webaudio/AnalyserNodeapis/webaudio/AnalyserNode
Syntax
var = AnalyserNode.getByteTimeDomainData(array);
Parameters
array
- Data-type
- void
Were time-domain analysis data will be copied.
Return Value
Returns an object of type
Uint8Array
Examples
var audioCtx = new AudioContext();
var analyser = audioCtx.createAnalyser();
// Uint8Array should be the same length as the fftSize
var dataArray = new Uint8Array(analyser.fftSize);
// fill the Uint8Array with data returned from getByteTimeDomainData()
analyser.getByteTimeDomainData(myDataArray);
Related specifications
- Web Audio API
- W3C Editor’s Draft