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

アプリケーションが定義し、ユーザーの既定のオーディオ エンドポイントが変更されたときに呼び出されるコールバックです。

## 構文

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

### パラメーター

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

コールバックの登録時にアプリケーションが定義して [XUserRegisterForDefaultAudioEndpointUtf16Changed](/reference/system/xuser/functions/xuserregisterfordefaultaudioendpointutf16changed) 関数に渡すコンテキストです。

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

既定のオーディオ エンドポイントが変更されたユーザーのローカル ID です。

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

ユーザーの既定のオーディオ エンドポイントがオーディオをレンダリングするか、キャプチャするかを指定する列挙値です。

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

マルチメディア デバイス リソースを表す文字列へのポインターです。

### 戻り値

Type: void

## 解説

既定のオーディオ エンドポイントが変更されたときにアプリケーションが呼び出すコールバックを登録するには、[XUserRegisterForDefaultAudioEndpointUtf16Changed](/reference/system/xuser/functions/xuserregisterfordefaultaudioendpointutf16changed) 関数を呼び出します。
この関数は、XUserDefaultAudioEndpointUtf16ChangedCallback 関数へのポインターを引数として受け取ります。

以前に登録された既定のオーディオ エンドポイント変更コールバックの登録を解除するには、[XUserUnregisterForDefaultAudioEndpointUtf16Changed](/reference/system/xuser/functions/xuserunregisterfordefaultaudioendpointutf16changed) 関数を呼び出します。

## 要件

**ヘッダー:** XUser.h

**ライブラリ:** xgameruntime.lib

**サポートされているプラットフォーム:** Windows、XBOX One 本体、XBOX Series 本体

## 関連項目

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


## Related topics

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