registerAudioSpectrumObserver abstract method

void registerAudioSpectrumObserver(
  1. AudioSpectrumObserver observer
)

Registers an audio spectrum observer.

After successfully registering an audio spectrum observer and calling enableAudioSpectrumMonitor to enable audio spectrum monitoring, the SDK reports the callbacks implemented in the AudioSpectrumObserver class at the interval you set. This method can be called before or after joining a channel.

  • observer Audio spectrum observer. See AudioSpectrumObserver.

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

void registerAudioSpectrumObserver(AudioSpectrumObserver observer);