Inherits IAudioTrack.
◆ AudioFilterPosition
The position of the audio filter in audio frame.
Enumerator |
---|
RecordingLocalPlayback | Work on the local playback
|
PostAudioProcessing | Work on the post audio processing.
|
RemoteUserPlayback | Work on the remote audio before mixing.
|
PcmSource | Work on the pcm source.
|
PcmSourceSending | Work on the sending branch of the pcm source.
|
PcmSourceLocalPlayback | Work on the local playback branch of the pcm source.
|
◆ 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()
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()
◆ 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 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.
◆ enableSpatialAudio()
virtual int 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.
◆ adjustPlayoutVolume()
virtual int adjustPlayoutVolume |
( |
int |
volume | ) |
|
|
pure virtualinherited |
Adjusts the playback volume.
- Parameters
-
volume | The playback volume. The value ranges between 0 and 100 (default). |
- Returns
- 0: Success.
- < 0: Failure.
◆ getPlayoutVolume()
virtual int getPlayoutVolume |
( |
int * |
volume | ) |
|
|
pure virtualinherited |
Gets the current playback volume.
- Parameters
-
volume | A pointer to the playback volume. |
- Returns
- 0: Success.
- < 0: Failure.
◆ addAudioFilter()
Adds an audio filter.
By adding an audio filter, you can apply various audio effects to the audio, for example, voice change.
- Parameters
-
- Returns
true
: Success.
false
: Failure.
◆ removeAudioFilter()
Removes the audio filter added by callling addAudioFilter
.
- Parameters
-
- Returns
true
: Success.
false
: Failure.
◆ enableAudioFilter()
virtual int enableAudioFilter |
( |
const char * |
id, |
|
|
bool |
enable |
|
) |
| |
|
inlinevirtualinherited |
Enable / Disable specified audio filter
- Parameters
-
id | id of the filter |
enable | enable / disable the filter with given id |
- Returns
-
◆ setFilterProperty()
virtual int setFilterProperty |
( |
const char * |
id, |
|
|
const char * |
key, |
|
|
const char * |
jsonValue |
|
) |
| |
|
inlinevirtualinherited |
set the properties of the specified audio filter
- Parameters
-
id | id of the filter |
key | key of the property |
jsonValue | json str value of the property |
- Returns
-
◆ getAudioFilter()
Gets the audio filter by its name.
- Parameters
-
name | The name of the audio filter. |
position | The position of the audio filter. See AudioFilterPosition. |
- Returns
- The pointer to the audio filter: Success.
- A null pointer: Failure.
◆ addAudioSink()
Adds an audio sink to get PCM data from the audio track.
- Parameters
-
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. |
- Returns
true
: Success.
false
: Failure.
◆ removeAudioSink()
Removes an audio sink.
- Parameters
-
- Returns
true
: Success.
false
: Failure.
◆ AddRef()
virtual void AddRef |
( |
| ) |
const |
|
pure virtualinherited |
◆ Release()
◆ HasOneRef()
virtual bool HasOneRef |
( |
| ) |
const |
|
pure virtualinherited |