add bus mono route

patch bump
This commit is contained in:
onyx-and-iris 2026-04-05 02:13:45 +01:00
parent d20fb52d4b
commit 6d01b8d2d3
3 changed files with 9 additions and 2 deletions

View File

@ -1,6 +1,6 @@
[project]
name = "vmr-http"
version = "0.3.1"
version = "0.3.2"
description = "HTTP API for controlling Voicemeeter"
readme = "README.md"
authors = [{ name = "onyx-and-iris", email = "code@onyxandiris.online" }]

View File

@ -33,3 +33,10 @@ async def get_gain(index: int, voicemeeter=Depends(get_voicemeeter_client)):
async def get_mute(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current mute status for the specified bus index."""
return {'mute': voicemeeter.bus[index].mute}
@router.get('/{index}/mono', tags=['bus'])
async def get_mono(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current mono status for the specified bus index."""
opts = ['Off', 'On', 'Stereo Reverse']
return {'mono': opts[voicemeeter.bus[index].mono]}

2
uv.lock generated
View File

@ -1151,7 +1151,7 @@ wheels = [
[[package]]
name = "vmr-http"
version = "0.3.1"
version = "0.3.2"
source = { editable = "." }
dependencies = [
{ name = "fastapi" },