Positional channel parameters
Configure positional audio for 3D voice.
Read time 2 minutesLast updated 20 hours ago
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
distance_modelclamping_distanceclamping_distancevx_get_positional_channel_uri()The following channel name is an example of what is passed to the Vivox servers when working with access tokens:// 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);
For more information, refer to the Access Token Developer Guide.sip:confctl-d-blindmelon-AppName.match72-team1-prox!p-30-1-1.000-1@tla.vivox.com