Methods for setting audio levels
Learn how to set audio input levels.
읽는 시간 1분최근 업데이트: 19일 전
The Vivox SDK uses various methods for setting audio input levels. You can use these requests to set the render device and capture device level for a user, for specific users in a single session, for specific users in an entire session, or for every participant in every session.
-
vx_req_session_set_participant_volume_for_me- Takes in the session handle for a session, the participant URI (as a char* string) for the target user, and the volume to set (between 0 and 100, with 50 acting as normal speaking volume).
- The server sets the participant volume in the specified section to the indicated value for only the local user, and sends out a response.
vx_resp_session_set_participant_volume_for_me
-
vx_req_aux_set_speaker_level- Sets the incoming audio level for all sessions playing through the user’s output device.
- Takes in an int for volume (between 0 and 100, with 50 acting as normal speaking volume), and then sets the volume of the user’s output device to that int.
-
vx_req_aux_set_mic_level- Sets the input device’s level.
- Takes in a single int for volume (between 0 and 100, with 50 acting as normal speaking volume), and then sets the local user's input device volume in the Vivox SDK to that level.
-
vx_req_sessiongroup_set_focus- Focus on a single session group.
- The audible volume of this group is raised relative to the channels that are not being focused on.
- Takes in the session handle for the target session group to focus on, and then begins boosting all audio that is playing through that channel.
- Use this with the session handle of a single session to undo this effect
- Use this with a single session group to give all sessions in a session group equal priority and focus.
void SetMicrophoneVolume(int level){ vx_req_aux_set_mic_level_t *req; vx_req_aux_set_mic_level_create(&req); req->level = level; vx_issue_request3(&req->base, &request_count);}void SetSpeakerVolume(int volume){ vx_req_aux_set_speaker_level_t *req; vx_req_aux_set_speaker_level_create(&req); req->level = level; vx_issue_request3(&req->base, &request_count);}