IAudioFrameObserverBase

Audio observer.

You can call RegisterAudioFrameObserver to register or unregister the IAudioFrameObserverBase audio observer.

OnEarMonitoringAudioFrame

Gets the raw audio data for ear monitoring.

public virtual bool OnEarMonitoringAudioFrame(AudioFrame audioFrame)
        {
            return true;
        }

To ensure the ear monitoring audio data format meets expectations, you can call SetEarMonitoringAudioFrameParameters to set the audio format, then call RegisterAudioFrameObserver to register the audio frame observer. The SDK calculates the sampling interval using the parameters in this method and triggers the OnEarMonitoringAudioFrame callback accordingly.

Parameters

audioFrame
The raw audio data. See AudioFrame.

Return Values

No practical meaning.

OnMixedAudioFrame

Retrieves the audio data after mixing captured and playback audio.

public virtual bool OnMixedAudioFrame(string channelId, AudioFrame audio_frame)
        {
            return true;
        }

To ensure the format of the audio data after mixing capture and playback meets expectations, you can call SetMixedAudioFrameParameters to set the audio data format, and then call RegisterAudioFrameObserver to register the audio frame observer. The SDK calculates the sampling interval based on the parameters of this method and triggers the OnMixedAudioFrame callback accordingly.

Parameters

audio_frame
Raw audio data. See AudioFrame.
channelId
Channel ID.

Return Values

No actual meaning.

OnPlaybackAudioFrame

Gets the raw audio data for playback.

public virtual bool OnPlaybackAudioFrame(string channelId, AudioFrame audio_frame)
        {
            return true;
        }

To ensure the playback audio data format meets expectations, you can call SetPlaybackAudioFrameParameters to set the audio format, then call RegisterAudioFrameObserver to register the audio frame observer. The SDK calculates the sampling interval using the parameters in this method and triggers the OnPlaybackAudioFrame callback accordingly.

Parameters

audio_frame
The raw audio data. See AudioFrame.
channelId
Channel ID.

Return Values

No practical meaning.

OnRecordAudioFrame

Gets the raw audio data for recording.

public virtual bool OnRecordAudioFrame(string channelId, AudioFrame audioFrame)
        {
            return true;
        }

To ensure the recorded audio data format meets expectations, you can call SetRecordingAudioFrameParameters to set the audio format, then call RegisterAudioFrameObserver to register the audio frame observer. The SDK calculates the sampling interval using the parameters in this method and triggers the OnRecordAudioFrame callback accordingly.

Parameters

audioFrame
The raw audio data. See AudioFrame.
channelId
Channel ID.

Return Values

No practical meaning.