Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Configures the volume setting applied to audio received by the local user from the specified target user.
Syntax
void set_audio_render_volume(
chat_user* targetUser,
float volume
)
Parameters
targetUser _In_
Type: chat_user*
The target user to whom the volume setting specified in volume is applied in relation to the local user. The target user can be either local or remote. The default volume for remote target users is 1.0, while the default volume for local target users is 0.0.
volume _In_range_(0,1)
Type: float
The new volume setting.
Return value
Type: void
None.
Remarks
This method configures the volume setting for audio sent to the local user from the specified target user. The volume setting is a fractional percentage between 0.0 (quietest possible) and 1.0 (the standard chat volume). Values less than 0.0 or greater than 1.0 are clamped to the nearest extremum. This is a local setting that takes effect immediately. You can call the chat_user::chat_user_local::audio_render_volume method to get the current volume setting for a specified target user.
If the local user is on a shared audio device, such as Kinect, the effective volume for a target user is the minimum of all volumes set for that target user by all local users on the shared device. For example, if User A and User B are on a Kinect, and User A has set remote User C's volume to 0.5, while User B has set remote User C's volume to 0.6, Game Chat 2 renders remote User C's audio to that Kinect with a volume of 0.5.
Requirements
Header: GameChat2.h
Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles