generateSweep method
Future<bool>
generateSweep({
- double startFrequency = 200.0,
- double endFrequency = 2000.0,
- int duration = 3000,
- double volume = 1.0,
override
Generates a frequency sweep from startFrequency to endFrequency.
startFrequency - The starting frequency in Hz (default: 200.0)
endFrequency - The ending frequency in Hz (default: 2000.0)
duration - The duration of the sweep in milliseconds (default: 3000)
volume - The volume of the sweep from 0.0 to 1.0 (default: 1.0)
Implementation
@override
Future<bool> generateSweep({
double startFrequency = 200.0,
double endFrequency = 2000.0,
int duration = 3000,
double volume = 1.0,
}) async {
final result = await methodChannel.invokeMethod<bool>('generateSweep', {
'startFrequency': startFrequency,
'endFrequency': endFrequency,
'duration': duration,
'volume': volume,
});
return result ?? false;
}