output slider goes to 200%

This commit is contained in:
nin0dev 2024-12-25 20:13:34 -05:00
parent 738443a8b2
commit fbeb3cb348
Signed by: nin0
SSH key fingerprint: SHA256:Is2DvJdw1OkSopR4wKJfdWV0fZhMLxpnCs1P1nPhIgA

View file

@ -27,8 +27,8 @@ function OutputVolumeComponent() {
return ( return (
<> <>
{Settings.plugins.VCPanelSettings.showOutputVolumeHeader && <Forms.FormTitle>Output volume - {Math.floor(outputVolume)}%</Forms.FormTitle>} {Settings.plugins.VCPanelSettings.showOutputVolumeHeader && <Forms.FormTitle>Output volume</Forms.FormTitle>}
<Slider maxValue={200} minValue={0} initialValue={outputVolume} hideBubble={Settings.plugins.VCPanelSettings.showOutputVolumeHeader} onValueChange={volume => { <Slider maxValue={200} minValue={0} onValueRender={v => `${v.toFixed(0)}%`} initialValue={outputVolume} asValueChanges={volume => {
FluxDispatcher.dispatch({ FluxDispatcher.dispatch({
type: "AUDIO_SET_OUTPUT_VOLUME", type: "AUDIO_SET_OUTPUT_VOLUME",
volume volume
@ -48,8 +48,8 @@ function InputVolumeComponent() {
return ( return (
<> <>
{Settings.plugins.VCPanelSettings.showInputVolumeHeader && <Forms.FormTitle>Input volume - {Math.floor(inputVolume)}%</Forms.FormTitle>} {Settings.plugins.VCPanelSettings.showInputVolumeHeader && <Forms.FormTitle>Input volume</Forms.FormTitle>}
<Slider maxValue={100} minValue={0} initialValue={inputVolume} onValueChange={volume => { <Slider maxValue={100} minValue={0} initialValue={inputVolume} asValueChanges={volume => {
FluxDispatcher.dispatch({ FluxDispatcher.dispatch({
type: "AUDIO_SET_INPUT_VOLUME", type: "AUDIO_SET_INPUT_VOLUME",
volume volume