use decibels for mic calibration slider
This commit is contained in:
parent
ee58335112
commit
e443719bed
3 changed files with 8 additions and 5 deletions
|
@ -286,7 +286,10 @@ export class AudioEngine extends ((EngineEmitter as unknown) as {
|
||||||
}
|
}
|
||||||
|
|
||||||
setMicCalibrationGain(value: number) {
|
setMicCalibrationGain(value: number) {
|
||||||
this.micCalibrationGain.gain.value = value;
|
this.micCalibrationGain.gain.value =
|
||||||
|
value === 0
|
||||||
|
? 1 :
|
||||||
|
Math.pow(10, (value / 10));
|
||||||
}
|
}
|
||||||
|
|
||||||
setMicVolume(value: number) {
|
setMicVolume(value: number) {
|
||||||
|
|
|
@ -83,7 +83,7 @@ const mixerState = createSlice({
|
||||||
open: false,
|
open: false,
|
||||||
volume: 1,
|
volume: 1,
|
||||||
gain: 1,
|
gain: 1,
|
||||||
baseGain: 1,
|
baseGain: 0,
|
||||||
openError: null,
|
openError: null,
|
||||||
id: "None",
|
id: "None",
|
||||||
},
|
},
|
||||||
|
|
|
@ -124,9 +124,9 @@ export function MicTab() {
|
||||||
<div>
|
<div>
|
||||||
<input
|
<input
|
||||||
type="range"
|
type="range"
|
||||||
min={1.0 / 10}
|
min={-24}
|
||||||
max={3}
|
max={24}
|
||||||
step={0.05}
|
step={0.2}
|
||||||
value={state.baseGain}
|
value={state.baseGain}
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
dispatch(MixerState.setMicBaseGain(parseFloat(e.target.value)))
|
dispatch(MixerState.setMicBaseGain(parseFloat(e.target.value)))
|
||||||
|
|
Loading…
Reference in a new issue