switch to sync endpoints, there isn't a lot of value in keeping them async.

patch bump
This commit is contained in:
2026-04-06 13:54:51 +01:00
parent e849d7739b
commit fb1c48c862
10 changed files with 52 additions and 54 deletions

View File

@@ -10,7 +10,7 @@ router = APIRouter()
@router.patch('')
@router.put('')
async def update_strip_comp_params(index: int, params: StripCompParams, voicemeeter=Depends(get_voicemeeter_client)):
def update_strip_comp_params(index: int, params: StripCompParams, voicemeeter=Depends(get_voicemeeter_client)):
"""Update one or more compressor parameters for the specified strip index."""
strip_comp = voicemeeter.strip[index].comp
updated = {}
@@ -21,63 +21,63 @@ async def update_strip_comp_params(index: int, params: StripCompParams, voicemee
@router.get('/knob')
async def get_strip_comp_knob(index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_strip_comp_knob(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current compressor knob value for the specified strip index."""
strip_comp = voicemeeter.strip[index].comp
return {'knob': strip_comp.knob}
@router.get('/gainin')
async def get_strip_comp_gainin(index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_strip_comp_gainin(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current compressor gain in value for the specified strip index."""
strip_comp = voicemeeter.strip[index].comp
return {'gainin': strip_comp.gainin}
@router.get('/ratio')
async def get_strip_comp_ratio(index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_strip_comp_ratio(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current compressor ratio value for the specified strip index."""
strip_comp = voicemeeter.strip[index].comp
return {'ratio': strip_comp.ratio}
@router.get('/threshold')
async def get_strip_comp_threshold(index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_strip_comp_threshold(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current compressor threshold value for the specified strip index."""
strip_comp = voicemeeter.strip[index].comp
return {'threshold': strip_comp.threshold}
@router.get('/attack')
async def get_strip_comp_attack(index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_strip_comp_attack(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current compressor attack value for the specified strip index."""
strip_comp = voicemeeter.strip[index].comp
return {'attack': strip_comp.attack}
@router.get('/release')
async def get_strip_comp_release(index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_strip_comp_release(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current compressor release value for the specified strip index."""
strip_comp = voicemeeter.strip[index].comp
return {'release': strip_comp.release}
@router.get('/knee')
async def get_strip_comp_knee(index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_strip_comp_knee(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current compressor knee value for the specified strip index."""
strip_comp = voicemeeter.strip[index].comp
return {'knee': strip_comp.knee}
@router.get('/gainout')
async def get_strip_comp_gainout(index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_strip_comp_gainout(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current compressor gain out value for the specified strip index."""
strip_comp = voicemeeter.strip[index].comp
return {'gainout': strip_comp.gainout}
@router.get('/makeup')
async def get_strip_comp_makeup(index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_strip_comp_makeup(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current compressor makeup status for the specified strip index."""
strip_comp = voicemeeter.strip[index].comp
return {'makeup': strip_comp.makeup}

View File

@@ -10,9 +10,7 @@ router = APIRouter()
@router.patch('')
@router.put('')
async def update_strip_denoiser_params(
index: int, params: StripDenoiserParams, voicemeeter=Depends(get_voicemeeter_client)
):
def update_strip_denoiser_params(index: int, params: StripDenoiserParams, voicemeeter=Depends(get_voicemeeter_client)):
"""Update one or more denoiser parameters for the specified strip index."""
strip_denoiser = voicemeeter.strip[index].denoiser
updated = {}
@@ -23,7 +21,7 @@ async def update_strip_denoiser_params(
@router.get('/knob')
async def get_strip_denoiser_knob(
def get_strip_denoiser_knob(
index: int,
voicemeeter=Depends(get_voicemeeter_client),
):

View File

@@ -9,7 +9,7 @@ router = APIRouter()
@router.patch('')
@router.put('')
async def update_strip_comp_params(
def update_strip_comp_params(
index: int,
gainlayer_index: int,
level: float = Body(..., ge=-60.0, le=12.0, embed=True),
@@ -22,6 +22,6 @@ async def update_strip_comp_params(
@router.get('/level')
async def get_strip_gain_layer_level(index: int, gainlayer_index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_strip_gain_layer_level(index: int, gainlayer_index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current gain layer level for the specified strip index."""
return {'gain_layer': {'level': voicemeeter.strip[index].gainlayer[gainlayer_index].gain}}

View File

@@ -10,7 +10,7 @@ router = APIRouter()
@router.patch('')
@router.put('')
async def update_strip_gate_params(index: int, params: StripGateParams, voicemeeter=Depends(get_voicemeeter_client)):
def update_strip_gate_params(index: int, params: StripGateParams, voicemeeter=Depends(get_voicemeeter_client)):
"""Update one or more gate parameters for the specified strip index."""
strip_gate = voicemeeter.strip[index].gate
updated = {}
@@ -21,49 +21,49 @@ async def update_strip_gate_params(index: int, params: StripGateParams, voicemee
@router.get('/knob')
async def get_strip_gate_knob(index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_strip_gate_knob(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current gate knob value for the specified strip index."""
strip_gate = voicemeeter.strip[index].gate
return {'knob': strip_gate.knob}
@router.get('/threshold')
async def get_strip_gate_threshold(index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_strip_gate_threshold(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current gate threshold value for the specified strip index."""
strip_gate = voicemeeter.strip[index].gate
return {'threshold': strip_gate.threshold}
@router.get('/damping')
async def get_strip_gate_damping(index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_strip_gate_damping(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current gate damping value for the specified strip index."""
strip_gate = voicemeeter.strip[index].gate
return {'damping': strip_gate.damping}
@router.get('/bpsidechain')
async def get_strip_gate_bpsidechain(index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_strip_gate_bpsidechain(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current gate sidechain value for the specified strip index."""
strip_gate = voicemeeter.strip[index].gate
return {'bpsidechain': strip_gate.bpsidechain}
@router.get('/attack')
async def get_strip_gate_attack(index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_strip_gate_attack(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current gate attack value for the specified strip index."""
strip_gate = voicemeeter.strip[index].gate
return {'attack': strip_gate.attack}
@router.get('/hold')
async def get_strip_gate_hold(index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_strip_gate_hold(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current gate hold value for the specified strip index."""
strip_gate = voicemeeter.strip[index].gate
return {'hold': strip_gate.hold}
@router.get('/release')
async def get_strip_gate_release(index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_strip_gate_release(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current gate release value for the specified strip index."""
strip_gate = voicemeeter.strip[index].gate
return {'release': strip_gate.release}

View File

@@ -18,7 +18,7 @@ router.include_router(eq.create_router(eq_kind='strip'), prefix='/eq', tags=['st
@router.patch('', tags=['strip'])
@router.put('', tags=['strip'])
async def update_strip_params(index: int, params: StripParams, voicemeeter=Depends(get_voicemeeter_client)):
def update_strip_params(index: int, params: StripParams, voicemeeter=Depends(get_voicemeeter_client)):
"""Update one or more parameters for the specified strip index."""
strip = voicemeeter.strip[index]
updated = {}
@@ -29,72 +29,72 @@ async def update_strip_params(index: int, params: StripParams, voicemeeter=Depen
@router.get('/gain', tags=['strip'])
async def get_gain(index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_gain(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current gain value for the specified strip index."""
return {'gain': voicemeeter.strip[index].gain}
@router.get('/mute', tags=['strip'])
async def get_mute(index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_mute(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current mute status for the specified strip index."""
return {'mute': voicemeeter.strip[index].mute}
@router.get('/mono', tags=['strip'])
async def get_mono(index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_mono(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current mono status for the specified strip index."""
return {'mono': voicemeeter.strip[index].mono}
@router.get('/solo', tags=['strip'])
async def get_solo(index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_solo(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current solo status for the specified strip index."""
return {'solo': voicemeeter.strip[index].solo}
@router.get('/A1', tags=['strip'])
async def get_A1(index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_A1(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current A1 output status for the specified strip index."""
return {'A1': voicemeeter.strip[index].A1}
@router.get('/A2', tags=['strip'])
async def get_A2(index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_A2(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current A2 output status for the specified strip index."""
return {'A2': voicemeeter.strip[index].A2}
@router.get('/A3', tags=['strip'])
async def get_A3(index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_A3(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current A3 output status for the specified strip index."""
return {'A3': voicemeeter.strip[index].A3}
@router.get('/A4', tags=['strip'])
async def get_A4(index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_A4(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current A4 output status for the specified strip index."""
return {'A4': voicemeeter.strip[index].A4}
@router.get('/A5', tags=['strip'])
async def get_A5(index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_A5(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current A5 output status for the specified strip index."""
return {'A5': voicemeeter.strip[index].A5}
@router.get('/B1', tags=['strip'])
async def get_B1(index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_B1(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current B1 output status for the specified strip index."""
return {'B1': voicemeeter.strip[index].B1}
@router.get('/B2', tags=['strip'])
async def get_B2(index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_B2(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current B2 output status for the specified strip index."""
return {'B2': voicemeeter.strip[index].B2}
@router.get('/B3', tags=['strip'])
async def get_B3(index: int, voicemeeter=Depends(get_voicemeeter_client)):
def get_B3(index: int, voicemeeter=Depends(get_voicemeeter_client)):
"""Get the current B3 output status for the specified strip index."""
return {'B3': voicemeeter.strip[index].B3}