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

# WASAPI

> XBOX GDK ゲームで Windows Audio Session API (WASAPI) を使用して、エンドポイント デバイスへのオーディオ ストリームを管理し、デバイスの無効化を処理します。

## WASAPI の概要

クライアント アプリケーションは、Windows Audio Session API (WASAPI) を使用して、アプリケーションとオーディオ エンドポイント デバイス間のオーディオ データのフローを管理できます。

詳細については、[WASAPI について](https://learn.microsoft.com/windows/desktop/coreaudio/wasapi)を参照してください。

## サンプル コード

WASAPI を使用してメモリ内の .wav ファイルを再生する方法を示すサンプル コードについては、[SimpleWASAPIPlaySound](https://aka.ms/atgsplSimpleWASAPIPlaySoundXDK) サンプルのソース コードを参照してください。

## デバイスの無効化

GDK では、ゲームはオーディオ クライアント デバイスの無効化を処理することが期待されます。無効化は、デバイスがアクティブ化または初期化されているときを含め、いつでも発生する可能性があります。詳細は、[XDK と GDK の比較](/build/console-features/audio/overviews/comparison-of-xdk-and-gdk-audio-api)にあります。


## Related topics

- [オーディオの概要](/ja-jp/build/console-features/audio/overviews/audio.md)
- [CreateCaptureAudioStateMonitor](/ja-jp/reference/audio/audiostatemonitor/functions/createcaptureaudiostatemonitor.md)
- [CreateRenderAudioStateMonitor](/ja-jp/reference/audio/audiostatemonitor/functions/createrenderaudiostatemonitor.md)
- [CreateCaptureAudioStateMonitorForCategory](/ja-jp/reference/audio/audiostatemonitor/functions/createcaptureaudiostatemonitorforcategory.md)
- [CreateCaptureAudioStateMonitorForCategoryAndDeviceRole](/ja-jp/reference/audio/audiostatemonitor/functions/createcaptureaudiostatemonitorforcategoryanddevicerole.md)
