> ## 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>This function is not yet implemented.</Note>

Retrieves the IDs of the audio render and capture devices of the headset connected to the specified controller.

<a id="syntaxSection" />

## Syntax

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

<a id="parametersSection" />

### Parameters

*dwUserIndex*   \_In\_\
Type: DWORD

Index of the gamer associated with the headset; a value in the range of 0 to `XUSER_MAX_COUNT - 1`.

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

ID of the audio render device; that is, the device that plays audio output, such as headphones.

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

Size, in wide characters, of the string buffer for the ID of the render device.

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

ID of the audio capture device; that is, the device that captures audio input, such as a microphone.

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

Size, in wide characters, of the string buffer for the ID of the capture device.

<a id="retvalSection" />

### Return value

Type: DWORD

If the function successfully retrieves the device IDs for render and capture, the return code is `ERROR_SUCCESS`.

If no headset is connected to the controller, the function also returns `ERROR_SUCCESS`, with `NULL` as the value for *pRenderDeviceId* and *pCaptureDeviceId*.

If the controller port device is not physically connected, the function returns `ERROR_DEVICE_NOT_CONNECTED`.

If the function fails, it returns a Win32 error code.

<a id="remarksSection" />

## Remarks

Callers must allocate the memory for the buffers passed to this function. The resulting strings can be of arbitrary length.

For more information, see [The XInputOnGameInput wrapper](/build/core-features/common/input/porting/input-porting-xinput#xinputWrapperSection).

<a id="requirementsSection" />

## Requirements

**Header:** XInputOnGameInput.h

**Library:** xgameruntime.lib

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

<a id="seealsoSection" />

## See also

[Porting from XInput to GameInput](/build/core-features/common/input/porting/input-porting-xinput)\
[XInputOnGameInput](/reference/input/xinputongameinput/xinputongameinput_members)


## Related topics

- [XInputOnGameInput](/reference/input/xinputongameinput/xinputongameinput_members.md)
- [XInputGetDeviceId](/reference/input/xinputongameinput/functions/xinputgetdeviceid.md)
- [Users and input devices](/build/core-features/common/user/users-input-devices.md)
- [PartyLocalChatControl::GetAudioInput](/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_getaudioinput.md)
- [Input](/build/core-features/common/input/gc-input-toc.md)
