fadeGlobalFilterParameter method

void fadeGlobalFilterParameter(
  1. FilterType filterType,
  2. int attributeId,
  3. double to,
  4. Duration time,
)

Fade a parameter of a filter.

it fades the global filter. filterType filter to modify a param. attributeId the attribute index to fade. to value the attribute should go in time duration. time the fade slope duration.

Throws SoLoudNotInitializedException if the engine is not initialized.

Implementation

void fadeGlobalFilterParameter(
  FilterType filterType,
  int attributeId,
  double to,
  Duration time,
) {
  if (!isInitialized) {
    throw const SoLoudNotInitializedException();
  }
  final error = _controller.soLoudFFI.fadeFilterParameter(
    filterType,
    attributeId,
    to,
    time.toDouble(),
  );
  if (error != PlayerErrors.noError) {
    _log.severe(() => 'fadeFilterParameter(): $error');
    throw SoLoudCppException.fromPlayerError(error);
  }
}