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

# PartyLocalChatControl::GetAudioOutput

> Provides the preferred speakers or headset device that the chat control has been configured to use for audio output.

Provides the preferred speakers or headset device that the chat control has been configured to use for audio output.

## Syntax

```cpp theme={null}
PartyError GetAudioOutput(  
    PartyAudioDeviceSelectionType* audioDeviceSelectionType,  
    PartyString* audioDeviceSelectionContext,  
    PartyString* deviceId  
)  
```

### Parameters

**`audioDeviceSelectionType`**   [PartyAudioDeviceSelectionType\*](/services/playfab/multiplayer/networking/reference/enums/partyaudiodeviceselectiontype)\
*output*

An output value indicating the selection type that was used to select the provided `deviceId`.

**`audioDeviceSelectionContext`**   [PartyString\*](/services/playfab/multiplayer/networking/reference/typedefs)\
*library-allocated output*

When using [PartyAudioDeviceSelectionType::None](/services/playfab/multiplayer/networking/reference/enums/partyaudiodeviceselectiontype) or [PartyAudioDeviceSelectionType::SystemDefault](/services/playfab/multiplayer/networking/reference/enums/partyaudiodeviceselectiontype), `audioDeviceSelectionContext` will be empty. When using [PartyAudioDeviceSelectionType::PlatformUserDefault](/services/playfab/multiplayer/networking/reference/enums/partyaudiodeviceselectiontype) or [PartyAudioDeviceSelectionType::Manual](/services/playfab/multiplayer/networking/reference/enums/partyaudiodeviceselectiontype), `audioDeviceSelectionContext` will be the value provided in a previous call to [SetAudioOutput()](/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_setaudiooutput). The memory for the string remains valid until the next [PartyLocalChatAudioOutputChangedStateChange](/services/playfab/multiplayer/networking/reference/structs/partylocalchataudiooutputchangedstatechange) is provided via [PartyManager::StartProcessingStateChanges()](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_startprocessingstatechanges) or the chat control is destroyed.

**`deviceId`**   [PartyString\*](/services/playfab/multiplayer/networking/reference/typedefs)\
*library-allocated output*

An output value indicating the selected audio output device's identifier. The memory for the string remains valid until the next [PartyLocalChatAudioOutputChangedStateChange](/services/playfab/multiplayer/networking/reference/structs/partylocalchataudiooutputchangedstatechange) is provided via [PartyManager::StartProcessingStateChanges()](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_startprocessingstatechanges) or the chat control is destroyed.

### Return value

PartyError

`c_partyErrorSuccess` if the call succeeded or an error code otherwise. The human-readable form of the error code can be retrieved via [PartyManager::GetErrorMessage()](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_geterrormessage).

## Remarks

An empty device identifier string indicates that no output has been selected.

## Requirements

**Header:** Party.h

## See also

[PartyLocalChatControl](/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/partylocalchatcontrol)\
[PartyLocalChatControl::SetAudioOutput](/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_setaudiooutput)\
[PartyLocalChatControl::GetAudioInput](/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_getaudioinput)


## Related topics

- [PartyLocalChatControl::SetAudioOutput](/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_setaudiooutput.md)
- [PartyLocalChatControl::GetAudioInput](/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_getaudioinput.md)
- [PartyLocalChatControl](/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/partylocalchatcontrol.md)
- [PartyLocalChatControl::SetAudioInput](/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_setaudioinput.md)
- [PartyLocalChatControl::GetAudioRenderVolume](/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_getaudiorendervolume.md)
