文档

​
​

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
        • Large 3D channels setting
        • Positional channel parameters
        • Positional channel configuration
      • 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

Positional channel parameters

Configure positional audio for 3D voice.
阅读时间3 分钟
最后更新于 8 个月前

Developers can optionally specify parameters for positional (d) channels by using an extended syntax in the channelid portion of the channel URI.
注意
Positional channel URIs with different 3D property parameters are considered different channels.
Immediately following the channelid, and before the "@", add "!p-" followed by hyphen-delimited parameters that indicate 3D channel property values in the following format:
!p-{max_range}-{clamping_distance}-{rolloff}-{distance_model}
注意
You can represent the
max_range
and
clamping_distance
in any units, but their units must match.
The channel parameters are:
  • {max_range}
    : The maximum distance from the listener at which you can hear a speaker. This must be an integer > 0.
    • If you want a lower
      max_range
      (For example, to limit the range of received texts), you can increase rolloff accordingly.
  • {clamping_distance}
    : The distance from the listener at which a speaker’s voice is heard at its original volume. This must be an integer in the range 0 <=
    clamping_distance
    <=
    max_range
    . Consider this to be the expected close-by conversational distance.
    • The
      clamping_distance
      sounds the most realistic when it is half the height of a typical speaking entity in your game. Consider adjusting this value if your players are shorter or taller than typical adult humans.
  • {rolloff}
    : The strength of the audio fade effect as the speaker moves away from the listener. This must be a floating point value >= 0 that is rounded to three decimal places. The best starting point for each
    distance_model
    is a rolloff of 1.0.
  • {distance_model}
    : The model that determines voice volume at different distances.
    • 1 = inverse-clamped (Default, most acoustically accurate.)
    • 2 = linear-clamped
    • 3 = exponent-clamped
      • When using the default
        distance_model
        value, if you want voice chat to naturally fade to near zero loudness at the edge of the
        max_range
        instead of being abruptly cut off, then set the
        max_range
        to a minimum of: 32 ×
        clamping_distance
        ÷
        rolloff
        .
注意
You must use the same units as those used for the channel parameters when reporting your actor’s position by using the Set3DPosition method.
Depending on the amount of ambient game noise or music, you might want to adjust the parameter values to ensure that voice chat is heard only at the distances you want.
When using the exponent-clamped
distance_model
, we recommend keeping the
clamping_distance
value at 1 or greater. We also recommend that you adjust the value of the rolloff parameter based on the following formula: rolloff = 3 ÷ (1 + 1.75 × log10(
clamping_distance
)).
The following code displays an example string with parameter syntax. You can construct the string manually or by using the method
vx_get_positional_channel_uri()
:
// The Vivox SDK must be initializedchar *uri = vx_get_positional_channel_uri("channelid", "domain.vivox.com", 30, 1, 1.000, channel_rolloff_curve_type_inverse_distance_clamped, "issuer");// returns "sip:confctl-d-issuer.channelid!p-30-1-1.000-1@domain.vivox.com". . .vx_free(uri);
The following channel name is an example of what is passed to the Vivox servers when working with access tokens:
sip:confctl-d-blindmelon-AppName.match72-team1-prox!p-30-1-1.000-1@tla.vivox.com
For more information, refer to the Access Token Developer Guide.

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

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

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


    报告此页面的问题