Class AbstractAudioAnalyzerAbstract
Constructors
constructor
-
Returns AbstractAudioAnalyzer
Properties
Abstractfft Size
The size of the FFT (fast fourier transform) to use when converting time-domain data to frequency-domain data. Default is 2048.
Abstractis Enabled
Whether the analyzer is enabled or not.
- The data retrieval functions return an empty array if the analyzer is not enabled.
Abstractmax Decibels
The maximum decibel value for the range of the analyzer. Default is -30.
Abstractmin Decibels
The minimum decibel value for the range of the analyzer. Default is -100.
Abstractsmoothing
A number between 0 and 1 that determines how quickly the analyzer's value changes. Default is 0.8.
Accessors
frequency Bin Count
-
get frequencyBinCount(): number
The number of data values that will be returned when calling getByteFrequencyData() or getFloatFrequencyData(). This is always half the
fftSize.Returns number
Methods
Abstractdispose
-
Releases associated resources.
Returns void
Abstractenable Async
-
Enables the analyzer
Returns Promise<void>
Abstractget Byte Frequency Data
-
Gets the current frequency data as a byte array
Returns Uint8Array
a Uint8Array if the analyzer is enabled, otherwise an empty array
get Byte Time Domain Data
-
Gets the current waveform data as a byte array
Returns Uint8Array
a Uint8Array with length
fftSizeif the analyzer is enabled, otherwise an empty array
Abstractget Float Frequency Data
-
Gets the current frequency data as a float array
Returns Float32Array
a Float32Array if the analyzer is enabled, otherwise an empty array
get Float Time Domain Data
-
Gets the current waveform data as a float array
Returns Float32Array
a Float32Array with length
fftSizeif the analyzer is enabled, otherwise an empty array
An AudioAnalyzer converts time-domain audio data into the frequency-domain.