Add system mute control via setMute action

Introduce a setMute protocol action and an NAudio-backed
AudioControlService so the Android client can toggle the Windows
render endpoint mute state over WebSocket.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Misaka
2026-06-17 22:12:13 +08:00
parent ad9a9021cc
commit 30da1680f2
9 changed files with 126 additions and 5 deletions

View File

@@ -19,6 +19,7 @@ public sealed class SyncActionJsonConverter : JsonConverter<SyncAction>
"backspace" => SyncAction.Backspace,
"enter" => SyncAction.Enter,
"ping" => SyncAction.Ping,
"setMute" => SyncAction.SetMute,
_ => throw new JsonException($"Unsupported sync action: {value}")
};
}
@@ -35,6 +36,7 @@ public sealed class SyncActionJsonConverter : JsonConverter<SyncAction>
SyncAction.Backspace => "backspace",
SyncAction.Enter => "enter",
SyncAction.Ping => "ping",
SyncAction.SetMute => "setMute",
_ => throw new JsonException($"Unsupported sync action: {value}")
};