pre_encode_audio_stream::set_processed_format

Specifies the format of the processed audio that is submitted to Game Chat 2 for encoding and transmission to remote endpoints.

Syntax

void set_processed_format(  
    game_chat_audio_format format  
)  

Parameters

format   _In_
Type: game_chat_audio_format

The format of the audio submitted for Game Chat 2 to encode and transmit. Only formats that meet the following criteria are supported:

  • Only single-channel (mono) formats
  • For pre-encode audio streams, only 32-bit float PCM, 32-bit integer PCM, and 16-bit integer PCM formats
  • Only formats with 16-kHz, 24-kHz, or 48-kHz sample rates

Return value

Type: void

None.

Remarks

This method specifies the format of the processed audio that is submitted to Game Chat 2 for encoding and transmission to remote endpoints, by calling pre_encode_audio_stream::submit_buffer. This method must be called before pre_encode_audio_stream::submit_buffer is called for the first time, and cannot be called after that.

Note

This method can be called only while the stream is open; otherwise, an error occurs. You can call the pre_encode_audio_stream::is_open method to confirm that the stream is open before calling this method.

For more information about manipulating pre-encode chat audio data, 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
pre_encode_audio_stream