Inherits agora::rtc::IAudioTrack.
Inherited by agora::rtc::IRemoteAudioTrackEx.
◆ getStatistics()
Gets the statistics of the remote audio track.
- Parameters
-
- Returns
true
: Success.
false
: Failure.
◆ getState()
Gets the state of the remote audio.
- Returns
- The state of the remote audio: REMOTE_AUDIO_STATE.
◆ registerMediaPacketReceiver()
virtual int agora::rtc::IRemoteAudioTrack::registerMediaPacketReceiver |
( |
IMediaPacketReceiver * |
packetReceiver | ) |
|
|
pure virtual |
Registers an IMediaPacketReceiver
object.
You need to implement the IMediaPacketReceiver
class in this method. Once you successfully register the media packet receiver, the SDK triggers the onMediaPacketReceived
callback when it receives an audio packet.
- Parameters
-
- Returns
- 0: Success.
- < 0: Failure.
◆ unregisterMediaPacketReceiver()
virtual int agora::rtc::IRemoteAudioTrack::unregisterMediaPacketReceiver |
( |
IMediaPacketReceiver * |
packetReceiver | ) |
|
|
pure virtual |
◆ setRemoteVoicePosition()
virtual int agora::rtc::IRemoteAudioTrack::setRemoteVoicePosition |
( |
float |
pan, |
|
|
float |
gain |
|
) |
| |
|
pure virtual |
Sets the sound position and gain
- Parameters
-
pan | The sound position of the remote user. The value ranges from -1.0 to 1.0:
- 0.0: the remote sound comes from the front.
- -1.0: the remote sound comes from the left.
- 1.0: the remote sound comes from the right.
|
gain | Gain of the remote user. The value ranges from 0.0 to 100.0. The default value is 100.0 (the original gain of the remote user). The smaller the value, the less the gain. |
- Returns
- 0: Success.
- < 0: Failure.