Agora Java API Reference for Android
|
#include <NGIAgoraAudioTrack.h>
Public Member Functions | |
virtual bool | getStatistics (RemoteAudioTrackStats &stats)=0 |
virtual REMOTE_AUDIO_STATE | getState ()=0 |
virtual int | registerMediaPacketReceiver (IMediaPacketReceiver *packetReceiver, aosl_ref_t ares=AOSL_REF_INVALID)=0 |
virtual int | unregisterMediaPacketReceiver (IMediaPacketReceiver *packetReceiver)=0 |
virtual int | registerAudioEncodedFrameReceiver (IAudioEncodedFrameReceiver *packetReceiver, aosl_ref_t ares=AOSL_REF_INVALID)=0 |
virtual int | unregisterAudioEncodedFrameReceiver (IAudioEncodedFrameReceiver *packetReceiver)=0 |
virtual int | setRemoteVoicePosition (float pan, float gain, aosl_ref_t ares=AOSL_REF_INVALID)=0 |
virtual int | adjustDecodedAudioVolume (int decoded_index, int volume, aosl_ref_t ares=AOSL_REF_INVALID)=0 |
virtual int | muteRemoteFromTimestamp (uint32_t timestamp)=0 |
virtual int | unmuteRemoteFromTimestamp (uint32_t timestamp)=0 |
virtual int | adjustAudioAcceleration (int percentage, aosl_ref_t ares=AOSL_REF_INVALID)=0 |
virtual int | adjustAudioDeceleration (int percentage, aosl_ref_t ares=AOSL_REF_INVALID)=0 |
virtual int | enableSpatialAudio (bool enabled, aosl_ref_t ares=AOSL_REF_INVALID)=0 |
virtual int | setRemoteUserSpatialAudioParams (const agora::SpatialAudioParams ¶ms, aosl_ref_t ares=AOSL_REF_INVALID)=0 |
![]() | |
virtual int | adjustPlayoutVolume (int volume, aosl_ref_t ares=AOSL_REF_INVALID)=0 |
virtual int | getPlayoutVolume (int *volume)=0 |
virtual bool | addAudioFilter (agora_refptr< IAudioFilter > filter, AudioFilterPosition position, ExtensionContext *extContext=NULL, aosl_ref_t ares=AOSL_REF_INVALID)=0 |
virtual bool | removeAudioFilter (agora_refptr< IAudioFilter > filter, AudioFilterPosition position, aosl_ref_t ares=AOSL_REF_INVALID)=0 |
virtual int | enableAudioFilter (const char *id, bool enable, AudioFilterPosition position, aosl_ref_t ares=AOSL_REF_INVALID) |
virtual int | setFilterProperty (const char *id, const char *key, const char *jsonValue, AudioFilterPosition position, aosl_ref_t ares=AOSL_REF_INVALID) |
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, aosl_ref_t ares=AOSL_REF_INVALID)=0 |
virtual bool | removeAudioSink (agora_refptr< IAudioSinkBase > sink, aosl_ref_t ares=AOSL_REF_INVALID)=0 |
![]() | |
virtual void | AddRef () const =0 |
virtual RefCountReleaseStatus | Release () const =0 |
virtual bool | HasOneRef () const =0 |
Additional Inherited Members | |
![]() | |
enum | AudioFilterPosition { RecordingLocalPlayback, PostAudioProcessing, RemoteUserPlayback, PcmSource, PcmSourceSending, PcmSourceLocalPlayback, RemoteMixedPlayback } |
The IRemoteAudioTrack class.
|
pure virtual |
Gets the statistics of the remote audio track.
stats | A reference to the statistics of the remote audio track: RemoteAudioTrackStats. |
true
: Success.false
: Failure.
|
pure virtual |
Gets the state of the remote audio.
|
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.
packetReceiver | The pointer to the IMediaPacketReceiver object. |
|
pure virtual |
Releases the IMediaPacketReceiver
object.
packetReceiver | The pointer to the IMediaPacketReceiver object. |
|
pure virtual |
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.
packetReceiver | The pointer to the IAudioEncodedFrameReceiver object. |
|
pure virtual |
Releases the IAudioEncodedFrameReceiver
object.
packetReceiver | The pointer to the IAudioEncodedFrameReceiver object. |
|
pure virtual |
Sets the sound position and gain
pan | The sound position of the remote user. The value ranges from -1.0 to 1.0:
|
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. |
|
pure virtual |
Sets the volume of each audio decoded channel
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.
|
|
pure virtual |
mute remote stream from timestamp
timestamp | The rtp timestamp of start mute |
|
pure virtual |
unmute remote stream from timestamp
timestamp | The rtp timestamp of start unmute |
|
pure virtual |
set percentage of audio acceleration during poor network
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):
|
|
pure virtual |
set percentage of audio deceleration during poor network
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):
|
|
pure virtual |
enable spatial audio
enabled | enable/disable spatial audio:
|
|
pure virtual |
Sets remote user parameters for spatial audio
params | spatial audio parameters |