-
new AudioMeter( context [, options ] )
-
Description
The
AudioMeterclass analyzes audio input and reports on its level (volume). It can be used in a WebAudio chain by connecting a source node to theAudioMeterobject.let meter = new AudioMeter(context); someSourceAudioNode.connect(meter);Parameters
Name Type Attributes Default Description contextAudioContext The
AudioContextthat this object belongs to.optionsObject <optional> {} Name Type Attributes Default Description smoothingTimeConstantnumber <optional> 0.8 A number between 0 and 1 to quantify the amount of smoothing applied to the calculated volume.
minDecibelsnumber <optional> -100 A number representing the minimum decibel value for scaling the FFT analysis data, where 0 dB is the loudest possible sound. The default value is -100 dB.
maxDecibelsnumber <optional> -30 A number representing the maximum decibel value for scaling the FFT analysis data, where 0 dB is the loudest possible sound. The default value is-30 dB.
fftSizenumber <optional> 2048 An unsigned integer, representing the window size of the FFT, given in number of samples. A higher value will result in more details in the frequency domain but fewer details in the time domain.
Details