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

# XUserDefaultAudioEndpointUtf16ChangedCallback

> XUserDefaultAudioEndpointUtf16ChangedCallback

# XUserDefaultAudioEndpointUtf16ChangedCallback

A callback that an application defines and invokes when the default audio endpoint for a user changes.

## Syntax

```cpp theme={null}
void XUserDefaultAudioEndpointUtf16ChangedCallback(  
         void* context,  
         XUserLocalId user,  
         XUserDefaultAudioEndpointKind defaultAudioEndpointKind,  
         const wchar_t* endpointIdUtf16  
)  
```

### Parameters

*context*   \_In\_opt\_\
Type: void\*

The context the application defines and sends to the [XUserRegisterForDefaultAudioEndpointUtf16Changed](/reference/system/xuser/functions/xuserregisterfordefaultaudioendpointutf16changed) function when the callback registers.

*user*   \
Type: [XUserLocalId](/reference/system/xuser/structs/xuserlocalid)

The local ID of the user whose default audio endpoint changes.

*defaultAudioEndpointKind*   \
Type: [XUserDefaultAudioEndpointKind](/reference/system/xuser/enums/xuserdefaultaudioendpointkind)

An enumeration value that specifies whether the user's default audio endpoint renders or captures audio.

*endpointIdUtf16*   \_In\_opt\_z\_\
Type: wchar\_t\*

A pointer to a string that represents the multimedia device resource.

### Return value

Type: void

## Remarks

To register a callback that an application invokes when the default audio endpoint changes, call the [XUserRegisterForDefaultAudioEndpointUtf16Changed](/reference/system/xuser/functions/xuserregisterfordefaultaudioendpointutf16changed) function.
The function takes a pointer to an XUserDefaultAudioEndpointUtf16ChangedCallback function as an argument.

To unregister a previously-registered default audio endpoint change callback, call the [XUserUnregisterForDefaultAudioEndpointUtf16Changed](/reference/system/xuser/functions/xuserunregisterfordefaultaudioendpointutf16changed) function.

## Requirements

**Header:** XUser.h

**Library:** xgameruntime.lib

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

## See also

[XUser](/reference/system/xuser/xuser_members)\
[XUserRegisterForDefaultAudioEndpointUtf16Changed](/reference/system/xuser/functions/xuserregisterfordefaultaudioendpointutf16changed)\
[XUserUnregisterForDefaultAudioEndpointUtf16Changed](/reference/system/xuser/functions/xuserunregisterfordefaultaudioendpointutf16changed)


## Related topics

- [XUserUnregisterForDefaultAudioEndpointUtf16Changed](/reference/system/xuser/functions/xuserunregisterfordefaultaudioendpointutf16changed.md)
- [XUserRegisterForDefaultAudioEndpointUtf16Changed](/reference/system/xuser/functions/xuserregisterfordefaultaudioendpointutf16changed.md)
- [XUserGetDefaultAudioEndpointUtf16](/reference/system/xuser/functions/xusergetdefaultaudioendpointutf16.md)
- [XUserDefaultAudioEndpointKind](/reference/system/xuser/enums/xuserdefaultaudioendpointkind.md)
- [XUserLocalId](/reference/system/xuser/structs/xuserlocalid.md)
