game_chat_stream_state_change_type

Defines the types of game_chat_stream_state_change objects that can be reported by chat_manager::start_processing_stream_state_changes.

Syntax

enum class game_chat_stream_state_change_type  : int64_t  
{  
    pre_encode_audio_stream_created,  
    pre_encode_audio_stream_closed,  
    pre_encode_audio_stream_destroyed,  
    post_decode_audio_source_stream_created,  
    post_decode_audio_source_stream_closed,  
    post_decode_audio_source_stream_destroyed,  
    post_decode_audio_sink_stream_created,  
    post_decode_audio_sink_stream_closed,  
    post_decode_audio_sink_stream_destroyed,  
}  

Constants

Constant Description
pre_encode_audio_stream_created A pre-encode audio stream has been created by Game Chat 2 for a capture device.

Use this state change as an opportunity to take care of any initialization that needs to happen before the stream starts returning buffers via pre_encode_audio_stream::get_next_buffer or starts accepting processed audio via pre_encode_audio_stream::submit_buffer. After this state change is returned to chat_manager::finish_processing_stream_state_changes, the stream becomes available for querying from chat_manager::get_pre_encode_audio_streams. In addition, the pre-encode audio stream begins queueing audio accessible from pre_encode_audio_stream::get_next_buffer and starts accepting processed audio via pre_encode_audio_stream::submit_buffer. The stream is valid until an associated game_chat_stream_state_change_type::pre_encode_audio_stream_destroyed stream state change is returned to Game Chat 2. This state change can occur only if pre-encode audio stream processing has been enabled.
pre_encode_audio_stream_closed A pre-encode audio stream for a capture device no longer returns buffers via pre_encode_audio_stream::get_next_buffer, and no longer accepts more buffers via pre_encode_audio_stream::submit_buffer.

This state change might be due to the capture device becoming unavailable or the users associated with the stream changing, if the stream represented a shared capture device. The stream is still valid, but any buffers submitted to the stream are silently dropped and calls to pre_encode_audio_stream::set_processed_format fatally fail. After this state change is returned to chat_manager::finish_processing_stream_state_changes, the stream is no longer available to use for audio manipulation and should be cleaned up so that it can be destroyed and reclaimed by Game Chat 2. This stream is valid until an associated game_chat_stream_state_change_type::pre_encode_audio_stream_destroyed stream state change is returned to Game Chat 2. This state change can occur only if pre-encode audio stream processing has been enabled.
pre_encode_audio_stream_destroyed A capture device's corresponding pre-encode audio stream will be destroyed by Game Chat 2.

This state change will occur only when all buffers retrieved from pre_encode_audio_stream::get_next_buffer have been returned to pre_encode_audio_stream::return_buffer, and no buffers submitted to pre_encode_audio_stream::submit_buffer are in use by the stream. After returning this state change to chat_manager::finish_processing_stream_state_changes, the corresponding stream is no longer valid. Any custom stream context assigned to this stream should be cleaned up before this state change is returned. This state change can occur only if pre-encode audio stream processing has been enabled.
post_decode_audio_source_stream_created A post-decode audio source stream has been created by Game Chat 2.

Use this state change as an opportunity to take care of any initialization that needs to happen before this stream starts queueing audio. After this state change is returned to chat_manager::finish_processing_stream_state_changes, the source stream becomes available for querying from chat_manager::get_post_decode_audio_source_streams, and begins queuing audio accessible from post_decode_audio_source_stream::get_next_buffer. The stream is valid until an associated game_chat_stream_state_change_type::post_decode_audio_source_stream_destroyed stream state change is returned to Game Chat 2. This state change can occur only if remote audio stream processing has been enabled.
post_decode_audio_source_stream_closed A post-decode audio source stream for a set of remote users no longer returns buffers through post_decode_audio_source_stream::get_next_buffer.

This state change might be due to the remote capture device becoming unavailable or the users associated with the stream changing if the stream represented a shared remote capture device. The stream is still valid, and should be used for returning buffers to Game Chat 2 through post_decode_audio_source_stream::return_buffer. After this state change is returned to chat_manager::finish_processing_stream_state_changes, the stream is no longer available to use for audio manipulation and should be cleaned up so that it can be destroyed and reclaimed by Game Chat 2. The stream is valid until an associated game_chat_stream_state_change_type::post_decode_audio_source_stream_destroyed stream state change is returned to Game Chat 2. This state change can occur only if remote audio stream processing has been enabled.
post_decode_audio_source_stream_destroyed A post-decode audio source stream will be destroyed by Game Chat 2.

This state change will occur only when all buffers retrieved from post_decode_audio_source_stream::get_next_buffer have been returned to post_decode_audio_source_stream::return_buffer. After returning this state change to chat_manager::finish_processing_stream_state_changes, the corresponding stream is valid. Any custom context assigned to this stream should be cleaned up before this state change is returned. This state change can occur only if remote audio stream processing has been enabled.
post_decode_audio_sink_stream_created A post-decode audio sink stream for a local render device has been created by Game Chat 2.

Use this state change as an opportunity to take care of any initialization that needs to happen before this stream starts to accept audio data via post_decode_audio_sink_stream::submit_mixed_buffer. After this state change is returned to chat_manager::finish_processing_stream_state_changes, the sink stream becomes available for querying from chat_manager::get_post_decode_audio_sink_streams and begins accepting processed audio via post_decode_audio_sink_stream::submit_mixed_buffer. The stream is valid until an associated game_chat_stream_state_change_type::post_decode_audio_sink_stream_destroyed stream state change is returned to Game Chat 2. This state change can occur only if remote audio stream processing has been enabled.
post_decode_audio_sink_stream_closed A post-decode audio sink stream for a local render device no longer accepts any more buffers through post_decode_audio_sink_stream::submit_mixed_buffer.

This state change might be due to the render device becoming unavailable or the users associated with the render device changing if the stream represented a shared render device. The stream is still valid, but any buffers submitted to the stream are silently dropped and calls to post_decode_audio_sink_stream::set_processed_format fatally fail. After this state change is returned to chat_manager::finish_processing_stream_state_changes, the stream is no longer available to use for audio manipulation and should be cleaned up so that it can be destroyed and reclaimed by Game Chat 2. The stream is valid until an associated game_chat_stream_state_change_type::post_decode_audio_sink_stream_destroyed stream state change is returned to Game Chat 2. This state change can occur only if remote audio stream processing has been enabled.
post_decode_audio_sink_stream_destroyed A post-decode audio sink stream will be destroyed by Game Chat 2.

This state change will occur only when no buffers submitted to post_decode_audio_sink_stream::submit_mixed_buffer are in use by the stream. After returning this state change to chat_manager::finish_processing_stream_state_changes, the corresponding stream is no longer valid. Any custom context assigned to this stream should be cleaned up before this state change is returned. This state change can occur only if remote audio stream processing has been enabled.

Remarks

This enumeration is used by the state_change_type member of a game_chat_stream_state_change object to define the type of state change represented by that object. You can cast the game_chat_stream_state_change structure to the structure that corresponds to the constant returned by the state_change_type member, to get more information about that specific type of state change. For more information about processing stream state changes, see Real-time audio manipulation.

Requirements

Header: GameChat2.h

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

See also

Intro to Game Chat 2
GameChat2 members