Skip to content

Commit

Permalink
Integrate upstream PR ottomated#288.
Browse files Browse the repository at this point in the history
  • Loading branch information
IVLIVS-III committed Dec 30, 2020
1 parent b9d0509 commit bda9c0d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/renderer/Voice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,15 @@ function calculateVoiceAudio(
panPos[0] = Math.min(999, Math.max(-999, panPos[0]));
panPos[1] = Math.min(999, Math.max(-999, panPos[1]));
if (other.inVent) {
gain.gain.value = 0;
return;
if (me.inVent) {
gain.gain.value = 1;
pan.positionX.setValueAtTime(panPos[0], audioContext.currentTime);
pan.positionY.setValueAtTime(panPos[1], audioContext.currentTime);
return;
} else {
gain.gain.value = 0;
return;
}
}
if (me.isDead && other.isDead) {
gain.gain.value = 1;
Expand Down

0 comments on commit bda9c0d

Please sign in to comment.