Adjust the Volume

Update time: 2025/06/11 16:45:39

During an audio and video call or interactive live streaming,the NERTC SDK offers an option to adjust volumes such as volumes of voice signals recorded and played back by the SDK. The volume adjustment feature is suitable for a diversity of scenarios where custom volumes are required.

In addition, the NERTC SDK also supports to obtain volumes of members in a room through monitoring callback. In some audio co-hosting or video conferencing scenarios, the production application layer usually needs to obtain the volume of speakers and displays the volume on the UI or dynamically adjust the layout according to their volume. See Monitoring Speakers’ Volume for details.

Set the capturing volume

The NERTC SDK records audios of members in a room using voice recorders, and playback to remote users. Set the signal amplitude of recorded voice using adjustRecordingSignalVolume to adjust the recording signal volume.

In this method, volume indicates the recording signal volume, with an acceptable value ranging from 0 to 400:

  • 0: mute.
  • 100: (Default) original volume, that is, signals are not scaled.
  • 400: 4 times of original volume, that is, original signals are amplified by 4 times.

Set the playback volume

Audio signals are transmitted to subscribers during an audio and video call, and then played back by a player. Set the signal amplitude of playback voice using adjustPlaybackSignalVolume or adjustUserPlaybackSignalVolume to adjust the playback signal volume.

  • adjustPlaybackSignalVolume defines the local playback signal volume of audio streams generated after mixing voices of all remote users. Volume defines the recording signal volume, with an acceptable value ranging from 0 to 400:
    • 0: mute.
    • 100: (Default) original volume, that is, signals are not scaled.
    • 400: 4 times of original volume, that is, original signals are amplified by 4 times.
  • adjustUserPlaybackSignalVolume defines the local playback signal volume of audio streams generated after mixing voices of all remote users.
    • uid is used to specify remote users, and volume is used to set the playback signal volume within a value range of 0 to 100.
    • Call this method repeatedly to set the local playback volumes of different remote users and adjust the local playback volumes of a single remote user.

Set the volume of an in-ear monitor

Set the in-ear monitoring volume using setEarbackVolume once the in-ear monitoring feature is enabled through enableEarback.

In this method, volume defines the playback signal volume, with an acceptable value ranging from 0 to 100, and the default value is 100.

Was this page helpful?
Yes
No
  • Set the capturing volume
  • Set the playback volume
  • Set the volume of an in-ear monitor