> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# game_chat_audio_format

> game_chat_audio_format

# game\_chat\_audio\_format

Describes the format information needed to interpret Game Chat 2 audio data.

<a id="syntaxSection" />

## Syntax

```cpp theme={null}
typedef struct game_chat_audio_format {  
    uint32_t sample_rate;  
    uint32_t channel_mask;  
    uint16_t channel_count;  
    uint16_t bits_per_sample;  
    game_chat_sample_type sample_type;  
    bool is_interleaved;  
} game_chat_audio_format  
```

<a id="membersSection" />

### Members

*sample\_rate*  \
Type: uint32\_t

The sample frequency at which each channel should be played or recorded.

*channel\_mask*  \
Type: uint32\_t

The channel mask with which to override the assignment of channels in a multichannel audio stream to speaker positions. For the bit-to-speaker mapping of this value, see the description of the *dwChannelMask* member for the [WAVEFORMATEXTENSIBLE](https://learn.microsoft.com/windows-hardware/drivers/ddi/ksmedia/ns-ksmedia-waveformatextensible) structure on [Microsoft Docs](/). To use the default mapping, set this to 0.

*channel\_count*  \
Type: uint16\_t

The number of channels of audio data.

*bits\_per\_sample*  \
Type: uint16\_t

The number of bits per sample. If this value is not byte-divisible, it is assumed that the containing sample type is padded with bits to make it byte-divisible.

*sample\_type*  \
Type: [game\_chat\_sample\_type](/reference/chat/gamechat2/enums/game_chat_sample_type)

Specifies whether Game Chat 2 is using Pulse Code Manipulation (PCM) data represented by integers ([game\_chat\_sample\_type::integer](/reference/chat/gamechat2/enums/game_chat_sample_type)) or floating-point numbers ([game\_chat\_sample\_type::ieee\_float](/reference/chat/gamechat2/enums/game_chat_sample_type)).

*is\_interleaved*  \
Type: bool

A flag representing whether the multichannel audio stream is interleaved for multi-channel formats.

Audio retrieved from Game Chat 2 is always marked as interleaved. This parameter has meaning only if [game\_chat\_audio\_format::channel\_count](/reference/chat/gamechat2/structs/game_chat_audio_format) is greater than 1.

<a id="remarksSection" />

## Remarks

This structure is used to describe the format of audio data for pre-encode audio streams, post-decode audio source streams, and post-decode audio sink streams in Game Chat 2. The following functions get or set the `game_chat_audio_format` used by their corresponding stream objects:

* [pre\_encode\_audio\_stream::get\_pre\_processed\_format](/reference/chat/gamechat2/classes/pre_encode_audio_stream/methods/pre_encode_audio_stream_get_pre_processed_format)
* [pre\_encode\_audio\_stream::set\_processed\_format](/reference/chat/gamechat2/classes/pre_encode_audio_stream/methods/pre_encode_audio_stream_set_processed_format)
* [post\_decode\_audio\_source\_stream::get\_pre\_processed\_format](/reference/chat/gamechat2/classes/post_decode_audio_source_stream/methods/post_decode_audio_source_stream_get_pre_processed_format)
* [post\_decode\_audio\_sink\_stream::set\_processed\_format](/reference/chat/gamechat2/classes/post_decode_audio_sink_stream/methods/post_decode_audio_sink_stream_set_processed_format)

For more information about audio formats, see [Real-time audio manipulation](/services/xbox-services/multiplayer/chat/game-chat2/real-time-audio-manipulation).

<a id="requirementsSection" />

## Requirements

**Header:** GameChat2.h

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

<a id="seealsoSection" />

## See also

[Intro to Game Chat 2](/services/xbox-services/multiplayer/chat/game-chat2/game-chat-2-intro)\
[chat\_manager](/reference/chat/gamechat2/classes/chat_manager/chat_manager)\
[pre\_encode\_audio\_stream](/reference/chat/gamechat2/classes/pre_encode_audio_stream/pre_encode_audio_stream)\
[post\_decode\_audio\_sink\_stream](/reference/chat/gamechat2/classes/post_decode_audio_sink_stream/post_decode_audio_sink_stream)\
[post\_decode\_audio\_source\_stream](/reference/chat/gamechat2/classes/post_decode_audio_source_stream/post_decode_audio_source_stream)\
[GameChat2 members](/reference/chat/gamechat2/gamechat2_members)


## Related topics

- [game_chat_sample_type](/reference/chat/gamechat2/enums/game_chat_sample_type.md)
- [post_decode_audio_sink_stream::set_processed_format](/reference/chat/gamechat2/classes/post_decode_audio_sink_stream/methods/post_decode_audio_sink_stream_set_processed_format.md)
- [pre_encode_audio_stream::get_pre_processed_format](/reference/chat/gamechat2/classes/pre_encode_audio_stream/methods/pre_encode_audio_stream_get_pre_processed_format.md)
- [post_decode_audio_source_stream::get_pre_processed_format](/reference/chat/gamechat2/classes/post_decode_audio_source_stream/methods/post_decode_audio_source_stream_get_pre_processed_format.md)
- [pre_encode_audio_stream::set_processed_format](/reference/chat/gamechat2/classes/pre_encode_audio_stream/methods/pre_encode_audio_stream_set_processed_format.md)
