AudioUtils class

Utility class for various audio processing, normalization, and analysis tasks.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

amplitudeToDecibels(double amplitude) double
Converts linear amplitude to decibels.
calculateAverageFrequency(List<double> spectrum) double
Calculates the average frequency from spectrum data.
calculateRMS(List<double> samples) double
Calculates the RMS (Root Mean Square) of audio samples.
decibelsToAmplitude(double decibels) double
Converts decibels to linear amplitude.
frequencyToLogScale(double frequency) double
Converts frequency to a logarithmic scale for better visualization.
isAudioActive(AudioData audioData, double threshold) bool
Detects if audio is above a certain threshold.
lowPassFilter(double input, double previousOutput, double alpha) double
Applies a low-pass filter to reduce high-frequency noise.
normalizeAmplitude(double amplitude) double
Normalizes a raw audio amplitude to a standard 0.0 to 1.0 range.
smoothValue(double currentValue, double previousValue, double factor) double
Applies exponential smoothing to currentValue based on a previousValue.