getMaxAmplitude method

Future<int> getMaxAmplitude()

Returns the maximum absolute amplitude that was sampled since the last call to this method.

Call this only after the setAudioSource.

Returns 0 when called for the first time.

Throws PlatformException if called before audio source has been set.

Implementation

Future<int> getMaxAmplitude() async {
  return await _channel.$getMaxAmplitude(this) as int;
}