fix: preserve accompaniment audio levels

This commit is contained in:
illusia committed 2026-09-04 14:30:51 +08:00
1 parent 169cf88306
commit 21d8d9c3bc
5 files changed
+53 -17

No files matched your search

+10
View File
@@ -83,3 +83,13 @@ test("voice protocol accepts and validates the microphone mute state", () => {
error: { code: "INVALID_MICROPHONE_STATE", message: "麦克风状态无效" },
});
});
test("voice protocol accepts and validates the accompaniment state", () => {
assert.deepEqual(parseClientCommand(JSON.stringify({ type: "setAccompanimentActive", payload: { active: true } })), {
type: "setAccompanimentActive",
payload: { active: true },
});
assert.deepEqual(parseClientCommand(JSON.stringify({ type: "setAccompanimentActive", payload: { active: "yes" } })), {
error: { code: "INVALID_ACCOMPANIMENT_STATE", message: "伴奏状态无效" },
});
});