Inherits agora::rtc::IAudioTrack.
Inherited by agora::rtc::IRemoteAudioTrackEx.
|
| virtual bool | getStatistics (RemoteAudioTrackStats &stats)=0 |
| |
| virtual REMOTE_AUDIO_STATE | getState ()=0 |
| |
| virtual int | registerMediaPacketReceiver (IMediaPacketReceiver *packetReceiver)=0 |
| |
| virtual int | unregisterMediaPacketReceiver (IMediaPacketReceiver *packetReceiver)=0 |
| |
| virtual int | registerAudioEncodedFrameReceiver (IAudioEncodedFrameReceiver *packetReceiver)=0 |
| |
| virtual int | unregisterAudioEncodedFrameReceiver (IAudioEncodedFrameReceiver *packetReceiver)=0 |
| |
| virtual int | setRemoteVoicePosition (float pan, float gain)=0 |
| |
| virtual int | adjustDecodedAudioVolume (int decoded_index, int volume)=0 |
| |
| virtual int | muteRemoteFromTimestamp (uint32_t timestamp)=0 |
| |
| virtual int | unmuteRemoteFromTimestamp (uint32_t timestamp)=0 |
| |
| virtual int | adjustAudioAcceleration (int percentage)=0 |
| |
| virtual int | adjustAudioDeceleration (int percentage)=0 |
| |
| virtual int | enableSpatialAudio (bool enabled)=0 |
| |
| virtual int | setRemoteUserSpatialAudioParams (const agora::SpatialAudioParams ¶ms)=0 |
| |
| virtual int | adjustPlayoutVolume (int volume)=0 |
| |
| virtual int | getPlayoutVolume (int *volume)=0 |
| |
| virtual bool | addAudioFilter (agora_refptr< IAudioFilter > filter, AudioFilterPosition position)=0 |
| |
| virtual bool | removeAudioFilter (agora_refptr< IAudioFilter > filter, AudioFilterPosition position)=0 |
| |
| virtual int | enableAudioFilter (const char *id, bool enable, AudioFilterPosition position) |
| |
| virtual int | setFilterProperty (const char *id, const char *key, const char *jsonValue, AudioFilterPosition position) |
| |
| virtual int | getFilterProperty (const char *id, const char *key, char *jsonValue, size_t bufSize, AudioFilterPosition position) |
| |
| virtual agora_refptr< IAudioFilter > | getAudioFilter (const char *name, AudioFilterPosition position) const =0 |
| |
| virtual bool | addAudioSink (agora_refptr< IAudioSinkBase > sink, const AudioSinkWants &wants)=0 |
| |
| virtual bool | removeAudioSink (agora_refptr< IAudioSinkBase > sink)=0 |
| |
| virtual void | AddRef () const =0 |
| |
| virtual RefCountReleaseStatus | Release () const =0 |
| |
| virtual bool | HasOneRef () const =0 |
| |
◆ 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 |
◆ registerAudioEncodedFrameReceiver()
Registers an IAudioEncodedFrameReceiver object.
You need to implement the IAudioEncodedFrameReceiver class in this method. Once you successfully register the media packet receiver, the SDK triggers the onEncodedAudioFrameReceived callback when it receives an audio packet.
- Parameters
-
- Returns
- 0: Success.
- < 0: Failure.
◆ unregisterAudioEncodedFrameReceiver()
◆ 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.
◆ adjustDecodedAudioVolume()
| virtual int agora::rtc::IRemoteAudioTrack::adjustDecodedAudioVolume |
( |
int |
decoded_index, |
|
|
int |
volume |
|
) |
| |
|
pure virtual |
Sets the volume of each audio decoded channel
- Parameters
-
| decoded_index | The channel index of the remote user. The value ranges from 0 to 100: |
| volume | The channel index of the remote user. The value ranges from 0 to 100.
- 0: mute the channel.
- 100: keep the origin volume of the channel.
|
- Returns
- 0: Success.
- < 0: Failure.
◆ muteRemoteFromTimestamp()
| virtual int agora::rtc::IRemoteAudioTrack::muteRemoteFromTimestamp |
( |
uint32_t |
timestamp | ) |
|
|
pure virtual |
mute remote stream from timestamp
- Note
- unmuteRemoteFromTimestamp should be called after muteRemoteFromTimestamp, othewise this stream will be muted all time
- Parameters
-
| timestamp | The rtp timestamp of start mute |
- Returns
- 0: Success.
- < 0: Failure.
◆ unmuteRemoteFromTimestamp()
| virtual int agora::rtc::IRemoteAudioTrack::unmuteRemoteFromTimestamp |
( |
uint32_t |
timestamp | ) |
|
|
pure virtual |
unmute remote stream from timestamp
- Note
- unmuteRemoteFromTimestamp should be called after muteRemoteFromTimestamp, othewise this stream will be muted all time
- Parameters
-
| timestamp | The rtp timestamp of start unmute |
- Returns
- 0: Success.
- < 0: Failure.
◆ adjustAudioAcceleration()
| virtual int agora::rtc::IRemoteAudioTrack::adjustAudioAcceleration |
( |
int |
percentage | ) |
|
|
pure virtual |
set percentage of audio acceleration during poor network
- Note
- The relationship between this percentage and the degree of audio acceleration is non-linear and varies with different audio material.
- Parameters
-
| percentage | The percentage of audio acceleration. The value ranges from 0 to 100. The higher the percentage, the faster the acceleration. The default value is 100 (no change to the acceleration):
- 0: disable audio acceleration.
- > 0: enable audio acceleration.
|
- Returns
- 0: Success.
- < 0: Failure.
◆ adjustAudioDeceleration()
| virtual int agora::rtc::IRemoteAudioTrack::adjustAudioDeceleration |
( |
int |
percentage | ) |
|
|
pure virtual |
set percentage of audio deceleration during poor network
- Note
- The relationship between this percentage and the degree of audio deceleration is non-linear and varies with different audio material.
- Parameters
-
| percentage | The percentage of audio deceleration. The value ranges from 0 to 100. The higher the percentage, the faster the deceleration. The default value is 100 (no change to the deceleration):
- 0: disable audio deceleration.
- > 0: enable audio deceleration.
|
- Returns
- 0: Success.
- < 0: Failure.
◆ enableSpatialAudio()
| virtual int agora::rtc::IRemoteAudioTrack::enableSpatialAudio |
( |
bool |
enabled | ) |
|
|
pure virtual |
enable spatial audio
- Parameters
-
| enabled | enable/disable spatial audio:
- true: enable spatial audio.
- false: disable spatial audio.
|
- Returns
- 0: Success.
- < 0: Failure.
◆ setRemoteUserSpatialAudioParams()
Sets remote user parameters for spatial audio
- Parameters
-
| params | spatial audio parameters |
- Returns
- 0: Success.
- < 0: Failure.