MultiAudioRouter.Core
0.1.0
dotnet add package MultiAudioRouter.Core --version 0.1.0
NuGet\Install-Package MultiAudioRouter.Core -Version 0.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MultiAudioRouter.Core" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MultiAudioRouter.Core" Version="0.1.0" />
<PackageReference Include="MultiAudioRouter.Core" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MultiAudioRouter.Core --version 0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MultiAudioRouter.Core, 0.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MultiAudioRouter.Core@0.1.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MultiAudioRouter.Core&version=0.1.0
#tool nuget:?package=MultiAudioRouter.Core&version=0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MultiAudioRouter
Windows 11 用の音声ルーティングツール。システム音声 / アプリ単位の音 を 任意の複数出力デバイス に同時に流せる WPF アプリ。プリセット保存と出力毎の音量調整つき。
機能
- 複数デバイス同時出力 — 1 つのキャプチャを N 出力に fan-out
- プロセス単位キャプチャ — Windows 11 の Process Loopback API でアプリの音だけ取得
- デバイス全体ループバック — 任意のレンダーデバイスに鳴ってる音をそのまま転送
- 出力毎の音量 — シンク独立スライダー
- プリセット保存 — JSON で
%APPDATA%\MultiAudioRouter\presets\に保存 - ライブメトリクス — capture rate / 出力バッファ充填率 / silent / discontinuity / padded
- ダーク UI + カスタムカーソル + アイコン
必要環境
- Windows 11 (もしくは Windows 10 build 20348+)
- 開発時: .NET SDK 10.0 以降
- 配布版 (self-contained 単一 exe) は .NET 不要
構成
| プロジェクト | 役割 |
|---|---|
| MultiAudioRouter.Core | キャプチャ / 再生 / ルーティングのコアライブラリ |
| MultiAudioRouter.Console | CLI 版(動作確認用) |
| MultiAudioRouter.App | WPF GUI |
| tools/IconBuilder | アプリアイコン (.ico) ジェネレータ |
| tools/CursorBuilder | カスタムカーソル (.cur) ジェネレータ |
主なクラス (Core):
- AudioRouter — キャプチャ + N 出力の fan-out パイプライン
- LoopbackCaptureService — WASAPI デバイスループバック
- ProcessLoopbackCaptureService — Process Loopback (
ActivateAudioInterfaceAsync直叩き) - AudioOutputService —
WasapiOutラッパー(音量・状態取得)
ビルド
dotnet build MultiAudioRouter.slnx
実行
GUI
dotnet run --project MultiAudioRouter.App
- 左カード: キャプチャ元 (デバイス or プロセス) を選択
- 中央カード: 出力先を複数選択 (Ctrl/Shift クリック)
- 右カード: ライブステータス + 音量スライダー
- 下: レイテンシ設定 → ▶ Start
- プリセット保存/読込はヘッダー右
CLI
$env:MAR_LOG="Debug"; dotnet run --project MultiAudioRouter.Console
単一 exe の作成
App プロジェクトを self-contained で publish:
dotnet publish MultiAudioRouter.App/MultiAudioRouter.App.csproj `
-c Release -r win-x64 --self-contained `
-p:PublishSingleFile=true `
-p:IncludeNativeLibrariesForSelfExtract=true `
-p:EnableCompressionInSingleFile=true `
-p:DebugType=embedded
出力: MultiAudioRouter.App/bin/Release/net10.0-windows/win-x64/publish/MultiAudioRouter.App.exe (~73MB、.NET ランタイム同梱)
アイコン / カーソルの再生成
# アイコン
dotnet run --project tools/IconBuilder -- MultiAudioRouter.App/app.ico
# カーソル
dotnet run --project tools/CursorBuilder -- MultiAudioRouter.App/Resources
レイテンシ調整 (経験則)
| パラメータ | 推奨値 | 用途 |
|---|---|---|
outputLatencyMs |
30〜50 | WasapiOut 内部レイテンシ。下げすぎると underrun |
prerollMilliseconds |
100〜300 | 開始時の頭出しバッファ |
maxBufferedMilliseconds |
1000〜1500 | レイテンシ上限。これを超えたら頭から間引き(緩やかに) |
実体感レイテンシ ≒ prerollMilliseconds + outputLatencyMs + ~30ms (capture 内部)。
トラブルシューティング
- 音が出ない: 選んだキャプチャ元に実際に音が鳴っているか確認 (Stats の
captureバイト数が 0 なら無音) - プロセスループバックでデータが来ない: Edge / Chrome は子レンダラープロセスで音を鳴らすので Include ツリー で親プロセス指定。メインの msedge.exe を選ぶ のが正解
- 周期的な音抜け: バッファサイズ・出力レイテンシを上げる。Process Loopback の場合は
hnsBufferDuration(内部 100ms) で吸収済み E_NOINTERFACE: COM apartment 不整合。Process Loopback は MTA 専用スレッド上で動かす必要あり (Core 内で対応済み)
開発フェーズ
- Phase 1: システム全体ループバック → 単一デバイス再生 (CLI)
- Phase 2: 複数デバイス同時出力
- Phase 3: Process Loopback API でアプリ単位キャプチャ
- Phase 4: WPF GUI 化 (ダークテーマ + カスタムアイコン/カーソル)
- Phase 5: プリセット保存・出力毎の音量調整
ライセンス
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-windows7.0 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0-windows7.0
- NAudio (>= 2.3.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 101 | 5/2/2026 |