> ## 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

Game Chat 2 のオーディオ データを解釈するために必要なフォーマット情報を記述します。

<a id="syntaxSection" />

## 構文

```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" />

### メンバー

*sample\_rate*  \
Type: uint32\_t

各チャネルを再生または録音する際のサンプル周波数。

*channel\_mask*  \
Type: uint32\_t

マルチチャネル オーディオ ストリームにおけるチャネルからスピーカー位置への割り当てをオーバーライドするために使用するチャネル マスク。この値のビットからスピーカーへのマッピングについては、[Microsoft Docs](/) の [WAVEFORMATEXTENSIBLE](https://learn.microsoft.com/windows-hardware/drivers/ddi/ksmedia/ns-ksmedia-waveformatextensible) 構造体の *dwChannelMask* メンバーの説明を参照してください。既定のマッピングを使用するには、これを 0 に設定します。

*channel\_count*  \
Type: uint16\_t

オーディオ データのチャネル数。

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

サンプルあたりのビット数。この値がバイト単位で割り切れない場合、含まれるサンプル タイプはビットでパディングされ、バイト単位で割り切れるようにされているとみなされます。

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

Game Chat 2 が整数 ([game\_chat\_sample\_type::integer](/reference/chat/gamechat2/enums/game_chat_sample_type)) または浮動小数点数 ([game\_chat\_sample\_type::ieee\_float](/reference/chat/gamechat2/enums/game_chat_sample_type)) で表現される Pulse Code Manipulation (PCM) データを使用しているかどうかを指定します。

*is\_interleaved*  \
Type: bool

マルチチャネル フォーマットにおいて、マルチチャネル オーディオ ストリームがインターリーブされているかどうかを表すフラグ。

Game Chat 2 から取得されるオーディオは常にインターリーブされているとしてマークされます。このパラメーターは、[game\_chat\_audio\_format::channel\_count](/reference/chat/gamechat2/structs/game_chat_audio_format) が 1 より大きい場合にのみ意味を持ちます。

<a id="remarksSection" />

## 解説

この構造体は、Game Chat 2 のエンコード前オーディオ ストリーム、デコード後オーディオ ソース ストリーム、およびデコード後オーディオ シンク ストリームのオーディオ データのフォーマットを記述するために使用されます。次の関数は、対応するストリーム オブジェクトによって使用される `game_chat_audio_format` を取得または設定します:

* [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)

オーディオ フォーマットの詳細については、「[リアルタイム オーディオ操作](/services/xbox-services/multiplayer/chat/game-chat2/real-time-audio-manipulation)」を参照してください。

<a id="requirementsSection" />

## 要件

**ヘッダー:** GameChat2.h

**サポートされているプラットフォーム:** Windows、XBOX One ファミリ本体および XBOX Series 本体

<a id="seealsoSection" />

## 関連項目

[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 メンバー](/reference/chat/gamechat2/gamechat2_members)


## Related topics

- [pre_encode_audio_stream::get_pre_processed_format](/ja-jp/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](/ja-jp/reference/chat/gamechat2/classes/post_decode_audio_source_stream/methods/post_decode_audio_source_stream_get_pre_processed_format.md)
- [post_decode_audio_sink_stream::set_processed_format](/ja-jp/reference/chat/gamechat2/classes/post_decode_audio_sink_stream/methods/post_decode_audio_sink_stream_set_processed_format.md)
- [game_chat_sample_type](/ja-jp/reference/chat/gamechat2/enums/game_chat_sample_type.md)
- [pre_encode_audio_stream::set_processed_format](/ja-jp/reference/chat/gamechat2/classes/pre_encode_audio_stream/methods/pre_encode_audio_stream_set_processed_format.md)
