-
new AudioMeter( context [, options ] )
-
Description
The
AudioMeter
class analyzes audio input and reports on its level (volume). It can be used in a WebAudio chain by connecting a source node to theAudioMeter
object.let meter = new AudioMeter(context); someSourceAudioNode.connect(meter);
Parameters
Name Type Attributes Default Description context
AudioContext The
AudioContext
that this object belongs to.options
Object <optional> {} Name Type Attributes Default Description smoothingTimeConstant
number <optional> 0.8 A number between 0 and 1 to quantify the amount of smoothing applied to the calculated volume.
minDecibels
number <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.
maxDecibels
number <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.
fftSize
number <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