enableAudioSpectrumMonitor abstract method

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

Enables audio spectrum monitoring.

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

  • intervalInMS The time interval (in milliseconds) at which the SDK triggers the onLocalAudioSpectrum and onRemoteAudioSpectrum callbacks. The default value is 100 ms. The value must not be less than 10 ms, otherwise the method call fails.

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. See Error Codes for details and resolution suggestions.

Implementation

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