IAudioSpectrumObserver
Audio spectrum observer.
OnLocalAudioSpectrum
Receives local audio spectrum.
public virtual bool OnLocalAudioSpectrum(AudioSpectrumData data)
{
return true;
}
After successfully calling RegisterAudioSpectrumObserver, implementing the OnLocalAudioSpectrum callback in IAudioSpectrumObserver, and calling EnableAudioSpectrumMonitor to enable audio spectrum monitoring, the SDK triggers this callback at the interval you set to report the spectrum of local audio data before encoding.
Parameters
- data
- Audio spectrum data of the local user. See AudioSpectrumData.
Return Values
Whether to receive spectrum data:
- true: Receive.
- false: Do not receive.
OnRemoteAudioSpectrum
Receives remote audio spectrum.
public virtual bool OnRemoteAudioSpectrum(UserAudioSpectrumInfo[] spectrums, uint spectrumNumber)
{
return true;
}
After successfully calling RegisterAudioSpectrumObserver, implementing the OnRemoteAudioSpectrum callback in IAudioSpectrumObserver, and calling EnableAudioSpectrumMonitor to enable audio spectrum monitoring, the SDK triggers this callback at the interval you set to report the spectrum of received remote audio data.
Parameters
- spectrums
- Audio spectrum information of remote users. See UserAudioSpectrumInfo. The array size equals the number of remote users detected by the SDK. An empty array indicates no remote user audio spectrum was detected.
- spectrumNumber
- Number of remote users.
Return Values
Whether to receive spectrum data:
- true: Receive.
- false: Do not receive.