WDMとかKSとかって何?
Voicemeter Bananaを使っていて出てくるので、最低限まとめておく
実用上のまとめ
WindowsではASIOとWASAPI、WDMのうち、自分に使い勝手のよいのをつかえばいい
ASIOはSteinbergの規格、それ以外はMicrosoft(Windows)の規格
いずれの規格でもハードウェアオーディオバッファに直接アクセスできる
WDMよりWASAPIの方が規格的には新しいが、遅延という意味でユーザーには関係ない(メーカーが何か特別な主張をしていない限り気にする理由がない)
音楽制作環境でのデファクトはASIOらしい
比較
PCオーディオのハイレゾ再生方式(ASIOとWASAPI)を比較する | システム開発のノウハウ
以下調査メモ
予備知識
通常のオーディオドライバは、音声データが3層のモジュールを通過する
Class driver (microsoftが開発)
Kernel mixer/Audio engine (microsoftが開発)
miniport driver (オーディオベンダが開発)
WDM(Windows Driver Model)
Windows98 / Windows2000 以降で使われている標準的なデバイスドライバーの構造
MMEと同様に遅延するらしい
KS(Kernel Streaming)
ASIO と同等な低レイテンシーを実現するオーディオデバイスとのインターフェイスの手法
Class driver - Kernel mixier/Audio engine - miniport driverに繋がる音声データの流れのこと
Kernel Streaming - Windows drivers | Microsoft Docs
Kernel streaming (KS) refers to the Microsoft-provided services that support kernel-mode processing of streamed data.
Microsoft provides three multimedia class driver models: port class, stream class, and AVStream. The vendor writes a minidriver that runs under one of these three class driver models.
WDM/KS(Direct KS)
レイテンシ低減を目的に、アプリ側でclass driverとkernel mixerをバイパスして、直接moniport driverに音を流す手法
基素.iconこれを素直に受け取るなら、遅延はKSよりも小さいはず
参考
ダブリュディーエムケイエス:WDM/KSとは | 偏ったDTM用語辞典 - DTM / MIDI 用語の意味・解説 | g200kg Music & Software
Windows Audio Session API
WDM/KSやASIOと同等の低レイテンシ
Windows Vista以降でサポート
WDMの後継
ワサピ:WASAPIとは | 偏ったDTM用語辞典 - DTM / MIDI 用語の意味・解説 | g200kg Music & Software
WDMとの違いは、WASAPIの方が抽象度が高い(プログラマに扱いやすいことが多い)APIということらしい
>WASAPI Exclusive also (typically) gives you direct access to the hardware audio buffers. The difference between WDM-KS and WASAPI is that the former has a lower-level interface for enumerating and configuring devices. But when it comes to the audio buffers themselves, both should provide direct access to hardware memory (if applicable).
https://www.audiosciencereview.com/forum/index.php?threads/kernel-streaming-asio-wasapi-and-music-players-foobar-jriver.7412/#post-171074
ExclusiveとSharedで違うようだ
Multi Media Extension
MME
ボイチェンで使うことはなさそう基素.icon
もともとは特にドライバーの名前という訳ではなく、Windows 3.0 のまだ標準ではオーディオや動画のサポートがなかった時代に開発されたWindowsの拡張パッケージであり、Windowsに追加インストールする事でオーディオと動画のサポートが得られるようになる、というものであった。
Windows3.1で標準パッケージに取り込まれ、以降Windowsでオーディオ(およびビデオ)を扱う際のドライバー(API)として使用されるようになる。
MMEはDTM用途としてはレイテンシーが大きく、満足な性能が出ないため、スタインバーグなどのサードパーティーが独自にASIOのようなDTM用途のドライバーを提供したり、WDM/KSのような裏技的なオーディオデバイスの駆動方法を使うなどの手法が取られている
0.3〜0.5秒遅延する
エムエムイー:MMEとは | 偏ったDTM用語辞典 - DTM / MIDI 用語の意味・解説 | g200kg Music & Software
Windowsで利用されるデフォルトのサウンドドライバ
Audio Stream Input Output
ASIO
Windows旧来のMMEではそのレイテンシ(データ送信から音声が出力されるまでの遅延時間)は200から500ミリ秒、DirectSoundでも50から100ミリ秒、Mac OSのSound Managerで20から50ミリ秒とされているが、ASIOの場合は数ミリ秒から10ミリ秒以下で、環境によっては1ミリ秒以下となる場合もあ
ASIO - Wikipedia
開発元:Steinberg
Windowsでの音楽制作環境のデファクトスタンダード
MacOSの場合はオーディオの入出力はシステム音、DAW関わらずCoreAudioを介する
DirectSound
「DirectX」の一部であり、音の入出力を司るAPIの名前。DirectSoundはそれまでのオーディオI/Fに関するAPIであるMMEよりも高機能であるが、基本的にはゲームへの応用を目指したものである。
ダイレクトサウンド:DirectSoundとは | 偏ったDTM用語辞典 - DTM / MIDI 用語の意味・解説 | g200kg Music & Software
MMEをつかったほうがいいという説
【藤本健のDigital Audio Laboratory】第528回:「Windowsオーディオエンジンで音質劣化」を検証 - AV Watch
iTunesでもWASAPIはサポートされているようだ 【藤本健のDigital Audio Laboratory】第588回:WASAPIに対応したiTunesの音質を検証。“究極のイコライザ”は本当? - AV Watch
歴史的には次のようになるようだ
MME (1990, Windows 3.0)
WDM (1998, Windows 98)
WASAPI (2006, Windows Vista)
参考
https://www.g200kg.com/jp/docs/dic/wdmks.html
Kernel Streaming, ASIO, WASAPI... and music players (Foobar, JRiver...) | Audio Science Review (ASR) Forum
2019.4.27
ASIO, WASAPI Exclusive, and WDM-KS are all bit-perfect as far as a typical software stack is concerned, so there shouldn't be any difference between them.
MME, DirectSound and WASAPI Shared do not provide bit-perfect guarantees. However, if the sample rate matches the one configured in the Windows audio control panel, and assuming you don't have any APOs ("audio effects") enabled, the worst that can happen is an extra layer of dithering, which is benign. If the sample rate doesn't match, then you're at the mercy of the Windows sample rate converter. I'm not sure how good Windows SRC is; maybe some day I'll do some measurements to investigate. However, it's quite unlikely you'll hear a significant difference even with a crappy SRC.
#サウンドプログラミング