Share via


post_decode_audio_sink_stream::can_receive_audio_from_source_stream

Determine whether Game Chat will allow audio communication from the users associated with a post-decode source stream to the users associated with this post-decode sink stream based on communication relationships and platform requirements such as system-level mutes. Also optionally provides a suggested volume that the source stream's audio should be mixed to.

Syntax

bool can_receive_audio_from_source_stream(  
    post_decode_audio_source_stream* sourceStream,  
    float* volume  
)  

Parameters

sourceStream   _In_
Type: post_decode_audio_source_stream*

The post-decode source audio stream whose users we are evaluating for their communication relationships.

volume   _Out_opt_
Type: float*

The volume that Game Chat would mix the source stream's audio with if post-decode buffer manipulation was not enabled. This is a suggested volume, but apps may use their own heuristic for resolving volume. The volume returned will be the minimum render volume between each of the source users and each of the sink users, regardless of the shared device resolution mode, similar to chat_user::chat_user_local::audio_render_volume.

Return value

Type: bool

Remarks

This is a convenience method that is equivalent to calling chat_user::get_effective_communication_relationship between each source stream user and each sink stream user and coalescing the result. In the event of a shared device, this method will return permissive or restrictive results based on the shared device resolution mode specified in chat_manager::initialize and the app-specified communication relationships. Platform restrictions (e.g. mute or block) will be restrictive regardless of the device resolution mode. Privacy/privilege for a stream will not consider users that have been removed by calling chat_manager::remove_user. If all of the users on the source or sink stream have been removed, then this method will return false and set the volume, if provided, to zero.

Requirements

Header: GameChat2.h

Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles

See also

post_decode_audio_sink_stream
chat_user::chat_user_local::audio_render_volume
game_chat_shared_device_communication_relationship_resolution_mode
chat_manager::initialize