IAudioEncodedFrameObserver

Observer for encoded audio.

OnMixedAudioEncodedFrame

Retrieves the encoded audio data after mixing local and all remote users' audio.

public virtual void OnMixedAudioEncodedFrame(IntPtr frameBufferPtr, int length,
                                                    EncodedAudioFrameInfo audioEncodedFrameInfo)
        {

        }

After calling RegisterAudioEncodedFrameObserver and setting the audio encoded content to AUDIO_ENCODED_FRAME_OBSERVER_POSITION_MIXED, you can use this callback to get the encoded audio data after mixing local and all remote users' audio.

Parameters

frameBufferPtr
Audio buffer.
length
Length of the audio data in bytes.
audioEncodedFrameInfo
Information about the encoded audio. See EncodedAudioFrameInfo.

OnPlaybackAudioEncodedFrame

Retrieves the encoded audio data of all remote users.

public virtual void OnPlaybackAudioEncodedFrame(IntPtr frameBufferPtr, int length,
                                                    EncodedAudioFrameInfo audioEncodedFrameInfo)
        {

        }

After calling RegisterAudioEncodedFrameObserver and setting the audio encoded content to AUDIO_ENCODED_FRAME_OBSERVER_POSITION_PLAYBACK, you can use this callback to get the encoded audio data of all remote users.

Parameters

frameBufferPtr
Audio buffer.
length
Length of the audio data in bytes.
audioEncodedFrameInfo
Information about the encoded audio. See EncodedAudioFrameInfo.

OnRecordAudioEncodedFrame

Retrieves the encoded audio data of the local user.

public virtual void OnRecordAudioEncodedFrame(IntPtr frameBufferPtr, int length,
                                                    EncodedAudioFrameInfo audioEncodedFrameInfo)
        {

        }

After calling RegisterAudioEncodedFrameObserver and setting the audio encoded content to AUDIO_ENCODED_FRAME_OBSERVER_POSITION_RECORD, you can use this callback to get the encoded audio data of the local user.

Parameters

frameBufferPtr
Audio buffer.
length
Length of the audio data in bytes.
audioEncodedFrameInfo
Information about the encoded audio. See EncodedAudioFrameInfo.