mirror of
https://github.com/onyx-and-iris/vmr-http.git
synced 2026-04-06 09:59:11 +00:00
add bus mono route
patch bump
This commit is contained in:
parent
d20fb52d4b
commit
6d01b8d2d3
@ -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" }]
|
||||
|
||||
@ -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]}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user