|
Agora Java API Reference for Android
|
Public Member Functions | |
| boolean | onLocalAudioSpectrum (AudioSpectrumInfo data) |
| Gets the statistics of a local audio spectrum. More... | |
| boolean | onRemoteAudioSpectrum (UserAudioSpectrumInfo[] userAudioSpectrumInfos, int spectrumNumber) |
| Gets the remote audio spectrum. More... | |
The IAudioSpectrumObserver interface.
| boolean io.agora.rtc2.audio.IAudioSpectrumObserver.onLocalAudioSpectrum | ( | AudioSpectrumInfo | data | ) |
Gets the statistics of a local audio spectrum.
After successfully calling registerAudioSpectrumObserver to implement the onLocalAudioSpectrum callback in IAudioSpectrumObserver and calling enableAudioSpectrumMonitor to enable audio spectrum monitoring, the SDK triggers this callback as the time interval you set to report the received remote audio data spectrum before encoding.
| data | The audio spectrum data of the local user. See AudioSpectrumInfo. |
true: Spectrum data is received.false: No spectrum data is received. | boolean io.agora.rtc2.audio.IAudioSpectrumObserver.onRemoteAudioSpectrum | ( | UserAudioSpectrumInfo[] | userAudioSpectrumInfos, |
| int | spectrumNumber | ||
| ) |
Gets the remote audio spectrum.
After successfully calling registerAudioSpectrumObserver to implement the onRemoteAudioSpectrum callback in the IAudioSpectrumObserver and calling enableAudioSpectrumMonitor to enable audio spectrum monitoring, the SDK will trigger the callback as the time interval you set to report the received remote audio data spectrum.
| userAudioSpectrumInfos | The audio spectrum information of the remote user. See UserAudioSpectrumInfo. The number of arrays is the number of remote users monitored by the SDK. If the array is null, it means that no audio spectrum of remote users is detected. |
| spectrumNumber | The number of remote users. |
true: Spectrum data is received.false: No spectrum data is received.
1.8.18