fix: prevent audio processing when no audio source is loaded
This commit is contained in:
parent
fca971e13c
commit
610d8350af
1 changed files with 4 additions and 2 deletions
|
@ -60,6 +60,8 @@ export default defineComponent({
|
|||
const vol_b = 1 - vol_x;
|
||||
|
||||
const onBBoxChange = () => {
|
||||
if (!audioSrc.value) return;
|
||||
|
||||
const x = props.bbox.x + props.bbox.w / 2;
|
||||
const y = props.bbox.y + props.bbox.h / 2;
|
||||
const distance = Math.sqrt(
|
||||
|
|
Loading…
Add table
Reference in a new issue