Agora RTC Objective-C API Reference
Refactor
|
Inherits IAudioTrack.
Public Types | |
enum | AudioFilterPosition { RecordingLocalPlayback, PostAudioProcessing, RemoteUserPlayback, PcmSource, PcmSourceSending, PcmSourceLocalPlayback, RemoteMixedPlayback } |
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, const AudioEncFrameRecvParams &recvParams, 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 | 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 |
The IRemoteAudioTrack class.
|
inherited |
The position of the audio filter in audio frame.
|
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. |
recvParams | The parameter |
|
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 virtualinherited |
Adjusts the playback volume.
volume | The playback volume. The value ranges between 0 and 100 (default). |
|
pure virtualinherited |
Gets the current playback volume.
volume | A pointer to the playback volume. |
|
pure virtualinherited |
Adds an audio filter.
By adding an audio filter, you can apply various audio effects to the audio, for example, voice change.
filter | A pointer to the audio filter. See IAudioFilter. |
position | The position of the audio filter. See AudioFilterPosition. |
extContext | The context of current filter. See ExtensionContext. |
true
: Success.false
: Failure.
|
pure virtualinherited |
Removes the audio filter added by callling addAudioFilter
.
filter | The pointer to the audio filter that you want to remove. See IAudioFilter. |
position | The position of the audio filter. See AudioFilterPosition. |
true
: Success.false
: Failure.
|
inlinevirtualinherited |
Enable / Disable specified audio filter
id | id of the filter |
enable | enable / disable the filter with given id |
position | The position of the audio filter. See AudioFilterPosition. |
|
inlinevirtualinherited |
set the properties of the specified audio filter
id | id of the filter |
key | key of the property |
jsonValue | json str value of the property |
position | The position of the audio filter. See AudioFilterPosition. |
|
inlinevirtualinherited |
get the properties of the specified video filter
id | id of the filter |
key | key of the property |
jsonValue | json str value of the property |
bufSize | max length of the json value buffer |
position | The position of the audio filter. See AudioFilterPosition. |
|
pure virtualinherited |
Gets the audio filter by its name.
name | The name of the audio filter. |
position | The position of the audio filter. See AudioFilterPosition. |
|
pure virtualinherited |
Adds an audio sink to get PCM data from the audio track.
sink | The pointer to the audio sink. See IAudioSinkBase. |
wants | The properties an audio frame should have when it is delivered to the sink. See AudioSinkWants. |
true
: Success.false
: Failure.
|
pure virtualinherited |
Removes an audio sink.
sink | The pointer to the audio sink to be removed. See IAudioSinkBase. |
true
: Success.false
: Failure.
|
pure virtualinherited |
|
pure virtualinherited |
|
pure virtualinherited |