Remove temporary print and prettier
This commit is contained in:
parent
07983e2ff3
commit
dfde5d7426
1 changed files with 2 additions and 2 deletions
|
@ -30,7 +30,6 @@ export function VUMeter(props: VUMeterProps) {
|
||||||
const animate = () => {
|
const animate = () => {
|
||||||
if (!isMic || isMicOpen) {
|
if (!isMic || isMicOpen) {
|
||||||
const result = audioEngine.getLevel(props.source);
|
const result = audioEngine.getLevel(props.source);
|
||||||
console.log(result);
|
|
||||||
setPeak(result);
|
setPeak(result);
|
||||||
rafRef.current = requestAnimationFrame(animate);
|
rafRef.current = requestAnimationFrame(animate);
|
||||||
}
|
}
|
||||||
|
@ -88,7 +87,8 @@ export function VUMeter(props: VUMeterProps) {
|
||||||
ctx.fillStyle = "#e8d120";
|
ctx.fillStyle = "#e8d120";
|
||||||
}
|
}
|
||||||
|
|
||||||
const valueOffset = (Math.max(peak, props.range[0]) - props.range[0]) / valueRange;
|
const valueOffset =
|
||||||
|
(Math.max(peak, props.range[0]) - props.range[0]) / valueRange;
|
||||||
|
|
||||||
ctx.fillRect(0, 0, valueOffset * width, height - 10);
|
ctx.fillRect(0, 0, valueOffset * width, height - 10);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue