enableAudioSpectrumMonitor abstract method

Future<void> enableAudioSpectrumMonitor({
  1. int intervalInMS = 100,
})

Turns on audio spectrum monitoring.

If you want to obtain the audio spectrum data of local or remote users, you can register the audio spectrum observer and enable audio spectrum monitoring. You can call this method either before or after joining a channel.

  • intervalInMS The interval (in milliseconds) at which the SDK triggers the onLocalAudioSpectrum and onRemoteAudioSpectrum callbacks. The default value is 100. Do not set this parameter to a value less than 10, otherwise calling this method would fail.

Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly.

Implementation

Future<void> enableAudioSpectrumMonitor({int intervalInMS = 100});