XUserDefaultAudioEndpointUtf16ChangedCallback

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

Syntax

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 function when the callback registers.

user   
Type: XUserLocalId

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

defaultAudioEndpointKind   
Type: 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 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 function.

Requirements

Header: XUser.h

Library: xgameruntime.lib

Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles

See also

XUser
XUserRegisterForDefaultAudioEndpointUtf16Changed
XUserUnregisterForDefaultAudioEndpointUtf16Changed