Positional channel parameters
Configure positional audio for 3D voice.
읽는 시간 2분최근 업데이트: 7달 전
Developers can optionally specify parameters for positional (d) channels by using an extended syntax in the channelid portion of the channel URI.
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}
The channel parameters are:
-
: The maximum distance from the listener at which you can hear a speaker. This must be an integer > 0.
{max_range}- If you want a lower (For example, to limit the range of received texts), you can increase rolloff accordingly.
max_range
- If you want a lower
-
: 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}<=clamping_distance. Consider this to be the expected close-by conversational distance.max_range- The 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.
clamping_distance
- The
-
: 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
{rolloff}is a rolloff of 1.0.distance_model -
: The model that determines voice volume at different distances.
{distance_model}-
1 = inverse-clamped (Default, most acoustically accurate.)
-
2 = linear-clamped
-
3 = exponent-clamped
- When using the default value, if you want voice chat to naturally fade to near zero loudness at the edge of the
distance_modelinstead of being abruptly cut off, then set themax_rangeto a minimum of: 32 ×max_range÷clamping_distance.rolloff
- When using the default
-
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 , we recommend keeping the 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()).
distance_modelclamping_distanceclamping_distanceThe 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.