oscillateGlobalFilterParameter method
void
oscillateGlobalFilterParameter(
- FilterType filterType,
- int attributeId,
- double from,
- double to,
- Duration time,
Oscillate a parameter of a filter.
it fades the global filter.
filterType
filter to modify a param.
attributeId
the attribute index to fade.
from
the starting value the attribute sould start to oscillate.
to
the ending value the attribute sould end to oscillate.
time
the fade slope duration.
Throws SoLoudNotInitializedException if the engine is not initialized.
Implementation
void oscillateGlobalFilterParameter(
FilterType filterType,
int attributeId,
double from,
double to,
Duration time,
) {
if (!isInitialized) {
throw const SoLoudNotInitializedException();
}
final error = _controller.soLoudFFI.oscillateFilterParameter(
filterType,
attributeId,
from,
to,
time.toDouble(),
);
if (error != PlayerErrors.noError) {
_log.severe(() => 'oscillateFilterParameter(): $error');
throw SoLoudCppException.fromPlayerError(error);
}
}