Feature Description

When using the Agora SDK, developers can adjust the recording and playback volumes for customization. For example, you can mute the remote audio by setting the volume to 0.

Implementation

Ensure that you prepared the development environment. See Integrate the SDK.

The Agora SDK provides methods to adjust the volume of the audio signals, which enables adjusting the recording and playback volumes.
The value of the volume ranges between 0 and 400. 100 (default) represents the original volume, and 400 is four times the original volume (amplifying the audio signals by four times).

int volume = 200;
// Sets the volume of the recording signal.
rtcEngine.adjustRecordingSignalVolume(volume);
// Sets the volume of the playback signal.
rtcEngine.adjustPlaybackSignalVolume(volume);

API Methods

Considerations

  • If the volume of the audio signal is set too high, noise may occur on some devices.
  • The API methods have return values. If the method fails, the return value is < 0.