setPitch method

Future<void> setPitch(
  1. double pitch
)

Change the current pitch of the MediaPlayer

_assetsAudioPlayer.setPitch(0.4);

MIN : 0.0 MAX : 16.0

if null, set to defaultPitch (1.0)

Implementation

Future<void> setPitch(double pitch) async {
  await _sendChannel.invokeMethod('pitch', {
    'id': id,
    'pitch': pitch.clamp(minPitch, maxPitch),
  });
}