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

# XInputGetAudioDeviceIds

> XInputGetAudioDeviceIds

# XInputGetAudioDeviceIds

<Note>この関数はまだ実装されていません。</Note>

指定されたコントローラーに接続されているヘッドセットのオーディオ レンダリング デバイスとキャプチャ デバイスの ID を取得します。

<a id="syntaxSection" />

## 構文

```cpp theme={null}
DWORD XInputGetAudioDeviceIds( 
         DWORD dwUserIndex,​
         LPWSTR pRenderDeviceId,​
         UINT * pRenderCount,​
         LPWSTR pCaptureDeviceId,​
         UINT * pCaptureCount
)​ 
```

<a id="parametersSection" />

### パラメーター

*dwUserIndex*   \_In\_\
型: DWORD

ヘッドセットに関連付けられているゲーマーのインデックス。0 ～ `XUSER_MAX_COUNT - 1` の範囲の値。

*pRenderDeviceId*    \_Out\_writes\_opt\_z\_(\*pRenderCount)\
型: LPWSTR

オーディオ レンダリング デバイスの ID。つまり、ヘッドホンなどのオーディオ出力を再生するデバイスです。

*pRenderCount*     \_Inout\_opt\_\
型: UINT\*

レンダリング デバイスの ID の文字列バッファーのサイズ (ワイド文字単位)。

*pCaptureDeviceId*    \_Out\_writes\_opt\_z\_(\*pCaptureCount)\
型: LPWSTR

オーディオ キャプチャ デバイスの ID。つまり、マイクなどのオーディオ入力をキャプチャするデバイスです。

*pCaptureCount*    \_Inout\_opt\_\
型: UINT\*

キャプチャ デバイスの ID の文字列バッファーのサイズ (ワイド文字単位)。

<a id="retvalSection" />

### 戻り値

型: DWORD

関数がレンダリングとキャプチャのデバイス ID の取得に成功した場合、戻り値のコードは `ERROR_SUCCESS` です。

コントローラーにヘッドセットが接続されていない場合も、関数は *pRenderDeviceId* と *pCaptureDeviceId* の値を `NULL` として `ERROR_SUCCESS` を返します。

コントローラー ポートのデバイスが物理的に接続されていない場合、関数は `ERROR_DEVICE_NOT_CONNECTED` を返します。

関数が失敗した場合は、Win32 エラー コードを返します。

<a id="remarksSection" />

## 解説

呼び出し元は、この関数に渡すバッファーのメモリを割り当てる必要があります。結果として得られる文字列は任意の長さになる可能性があります。

詳細については、[XInputOnGameInput ラッパー](/build/core-features/common/input/porting/input-porting-xinput#xinputWrapperSection)を参照してください。

<a id="requirementsSection" />

## 要件

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

**ライブラリ:** xgameruntime.lib

**対応プラットフォーム:** XBOX One ファミリー本体および XBOX Series 本体

<a id="seealsoSection" />

## 関連項目

[XInput から GameInput への移植](/build/core-features/common/input/porting/input-porting-xinput)\
[XInputOnGameInput](/reference/input/xinputongameinput/xinputongameinput_members)


## Related topics

- [XInputOnGameInput](/ja-jp/reference/input/xinputongameinput/xinputongameinput_members.md)
- [PartyLocalChatControl::GetAudioInput](/ja-jp/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_getaudioinput.md)
- [GameInputDeviceStatus](/ja-jp/reference/input/gameinput/enums/gameinputdevicestatus.md)
- [Input](/ja-jp/build/core-features/common/input/gc-input-toc.md)
- [XInputGetDeviceId](/ja-jp/reference/input/xinputongameinput/functions/xinputgetdeviceid.md)
