Core Audio (コア オーディオ) とは、Windows上で利用できる、新しいオーディオコンポーネントである。Windows Vistaで初めて導入されたのち、Windows 7で多数の機能拡張がなされたWhat's New for Core Audio APIs in Windows 7 (Windows)ほか、Windows 8でも非同期操作のための機能が追加されているActivateAudioInterfaceAsync function (Windows)。

概要 Core Audioは、DirectSound、、WindowsマルチメディアAPI (waveXxx関数、mixerXxx関数) およびMedia Foundationといった高レベルAPIの基盤を提供する、COMベースの新しいオーディオAPIであり、ヘッドフォンやマイクといったオーディオデバイスにアクセスする手段を提供する。

導入されたCore Audio APIsは以下の4つのWin32 APIである"The core audio APIs include the MMDevice API, WASAPI, the DeviceTopology API, and the EndpointVolume API" Windows Developer. User-Mode Audio Components.。

MMDevice API: 非推奨、代替はWindows.Devices.Enumeration"These APIs are not recommended for Windows applications. MMDevice API (replaced by Windows.Devices.Enumeration) DeviceTopology API EndpointVolume API" Windows Hardware Developer. Windows Audio Architecture. WASAPI DeviceTopology API: 非推奨 EndpointVolume API: 非推奨

Core AudioはWindowsのユーザーモードのシステムコンポーネントであるAudioses.dllおよびMmdevapi.dllに実装されているHeader Files and System Components (Windows)。

またユーザーモードを基礎とするオーディオサブシステムが追加された"the core audio APIs serve as the foundation of the user-mode audio subsystem." Windows Developer. User-Mode Audio Components.。オーディオストリームが共有モード(shared mode)で動作する場合はWindows audio engineへのルーティングが行なわれ、全ストリームがミックスされてエンドポイントデバイスに渡される。逆に排他モード(exclusive mode)で動作する場合はaudio engineをバイパスしてアプリケーションとエンドポイントが1:1でデータ転送を行なう"if a client opens a stream in exclusive mode, the client has exclusive access to the audio hardware." Windows Developer. User-Mode Audio Components.。Audio engineの実体はユーザーモードで動作する特殊なプロセス(Audiodg.exe)である"The audio engine is a user-mode system component (Audiodg.dll)" Windows Developer. User-Mode Audio Components."The audio engine runs in its own protected process, which is separate from the process that the application runs in." Windows Developer. User-Mode Audio Components.。

背景 Windows XPではオーディオパイプラインの大半がカーネルモードに存在していたが、WASAPIではこれをユーザーモードに移動した。これによって例えばエフェクト処理で致命的な問題が発生した場合、Windows XPではOSがブルースクリーンとなるが、Windows Vista以降ではオーディオサービス (audiosrv) やオーディオエンジン (audiodg) が異常終了するだけでOS全体には影響がないようになっている。

Windowsオーディオデバイスグラフアイソレーション Windowsオーディオデバイスグラフアイソレーション()はWindowsオーディオを司るプロセスの1つである。対応するアプリケーションは audiodg.exe 。

audiodg.exe は audio engine を構成する要素の片方であり、もう片方の要素でありエンジンの実体であるaudioeng.dll をロードする"The audio engine consists of two related components, the Audio Device Graph (audiodg.exe), which loads the Audio Engine (audioeng.dll)." Microsoft. Windows Audio Architecture. 2022-09-14閲覧.。

Windows Audio Windows Audio はオーディオを司るWindowsサービスである"Windowsベースのプログラムのオーディオを管理します。" Windows 10 - サービス (アプリ).。実体は AudioSrv.dll であり、専用の Svchost.exe を介して実行される"the 'Windows Audio' service AudioSrv.dll (AudioSrv) runs in a dedicated svchost.exe process." Microsoft. Audio measures. 2022-09-14閲覧.。audiodg.exe を介してAudioEngineを管理しており" It also launches a helper 'Windows Audio Device Graph Isolation' process audiodg.exe (AudioDg)." Microsoft. Audio measures. 2022-09-14閲覧.、このサービスをオフにすると主要な音声機能がストップする。

脚注

関連項目 Microsoft Windows Windows API DirectSound WASAPI ASIO

外部リンク MSDN Core Audio APIs (Windows)