XUserRegisterForDefaultAudioEndpointUtf16Changed

Registers a callback that the application defines and invokes when the default audio endpoint changes.

Syntax

HRESULT XUserRegisterForDefaultAudioEndpointUtf16Changed(  
         XTaskQueueHandle queue,  
         void* context,  
         XUserDefaultAudioEndpointUtf16ChangedCallback* callback,  
         XTaskQueueRegistrationToken* token  
)  

Parameters

queue   _In_opt_
Type: XTaskQueueHandle

A handle to the asynchronous queue to put the change callback on.

context   _In_opt_
Type: void*

The context the application defines and passes to the callback.

callback   _In_
Type: XUserDefaultAudioEndpointUtf16ChangedCallback*

The callback the application defines and registers for audio endpoint change events.

token   _Out_
Type: XTaskQueueRegistrationToken*

On success, receives a token that identifies the callback. To un-register the callback, pass this token to the XUserUnregisterForDefaultAudioEndpointUtf16Changed function.

Return value

Type: HRESULT

HRESULT success or error code.
For a list of error codes, see Error Codes.

Remarks

Note

This function isn't safe to call on a time-sensitive thread. For more information, see Time-sensitive threads.

To unregister a previously-registered default audio endpoint change callback, call XUserUnregisterForDefaultAudioEndpointUtf16Changed.

To register a user device association callback, call XUserRegisterForDeviceAssociationChanged.

To un-register a previously registered user device association change callback, call XUserUnregisterForDeviceAssociationChanged.

Requirements

Header: XUser.h

Library: xgameruntime.lib

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

See also

XUser
XUserDefaultAudioEndpointUtf16ChangedCallback
XUserUnregisterForDefaultAudioEndpointUtf16Changed