文档

​
​

Development

User Acquisition

Monetization

工业

Vivox Core SDK

Vivox Core SDK

此页面不支持所选语言。
Vivox
​
​
Vivox Core SDK
  • Overview
  • Before you begin
  • Get started
  • Release notes
  • Developer Guide
    • Client SDK basics
    • Channels
      • Channel name criteria
      • Channel types
      • Echo channels
      • Positional channels
      • Volume differences
      • Channel identifiers for large scale games
      • Participant events
      • Channel webhooks
      • Join a channel
      • Leave a channel
      • Kick a user from a channel
      • Manage session groups
      • Audio injection
      • Methods for setting audio levels
      • Derumbler
      • Automatic connection recovery
    • Presence management
    • Messaging
    • Manage audio
    • Couch co-op
    • Android app development
    • iOS app development
    • macOS app development
    • Windows app development
    • Real-time recording
    • Speech-to-text audio transcription
    • Text-to-speech
    • Troubleshooting
  • Reference
  • Privacy overview
  1. Vivox Core SDK documentation

Methods for setting audio levels

Learn how to set audio input levels.
阅读时间2 分钟
最后更新于 8 个月前

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
      vx_resp_session_set_participant_volume_for_me
      response.
  • 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.
The following code displays an example implementation for setting both input and output audio levels:
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);}

Copyright © 2026 Unity Technologies
法律信息隐私政策CookiesDocumentation Terms of Use请勿出售或分享我的个人信息您的隐私选择(Cookie 设置)

“Unity”、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属公司在美国和其他地方的商标或注册商标(此处查看更多信息)。其他名称或品牌是其各自所有者的商标。

为方便起见,一些页面是机器翻译的,可能包含不准确的内容。如有信息不一致的情况,以英文版本为准。


    报告此页面的问题