mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Added limiter to peak meter
This commit is contained in:
parent
b282e5d676
commit
12b9337026
@ -15,7 +15,7 @@ export function AudioSourcePanel(props: { source: AudioSource }) {
|
||||
|
||||
useEffect(() => {
|
||||
setInterval(() => {
|
||||
setMeterLevel(props.source.getMeter().getPeaks().current[0]);
|
||||
setMeterLevel(Math.min(100, props.source.getMeter().getPeaks().current[0]));
|
||||
}, 50);
|
||||
}, []);
|
||||
|
||||
@ -92,14 +92,16 @@ export function AudioSourcePanel(props: { source: AudioSource }) {
|
||||
</div>
|
||||
<OlRangeSlider
|
||||
value={props.source.getVolume() * 100}
|
||||
min={0}
|
||||
max={200}
|
||||
onChange={(ev) => {
|
||||
props.source.setVolume(parseFloat(ev.currentTarget.value) / 100);
|
||||
}}
|
||||
className="absolute top-[18px]"
|
||||
/>
|
||||
</div>
|
||||
<div className="h-[40px] min-w-[40px] p-2">
|
||||
<span>{Math.round(props.source.getVolume() * 100)}</span>
|
||||
<div className="h-[40px] min-w-[60px] p-2 text-md">
|
||||
<span>{Math.round(props.source.getVolume() * 100)}%</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
"redCommanderPassword": "302bcbaf2a3fdcf175b689bf102d6cdf9328f68a13d4096101bba806482bfed9"
|
||||
},
|
||||
"frontend": {
|
||||
"port": 3001,
|
||||
"port": 3000,
|
||||
"elevationProvider": {
|
||||
"provider": "https://srtm.fasma.org/{lat}{lng}.SRTMGL3S.hgt.zip",
|
||||
"username": null,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user