VolumeSmoother constructor

VolumeSmoother({
  1. double smoothingFactor = 0.3,
  2. int maxHistorySize = 100,
})

Creates a VolumeSmoother with the specified smoothing factor.

smoothingFactor controls how much smoothing is applied (0.0 to 1.0).

maxHistorySize limits the number of volume values kept in history (default: 100).

Implementation

VolumeSmoother({
  double smoothingFactor = 0.3,
  int maxHistorySize = 100,
})  : smoothingFactor = smoothingFactor.clamp(0.0, 1.0),
      _maxHistorySize = maxHistorySize;