Metadata
Description
Panning effect seems to disappear for the first movement after page reload. For an example, going towards right from Column Z should have almost no sound on the left side of earphones or headphones, but first movement in a program plays a clear sound, even on the left side of the earphones or headphones.
Comments
-
Tony Atkins [RtF] commented
2021-04-06T04:22:54.283-0400 The panning is only updated when the first movement sound is played, and takes effect in 0.5 seconds.
this.panner.pan.rampTo(panningLevel, 0.5)
Since we don't tie the panning level to the state variable, the first sound after a refresh pans from 0 (centre) to the desired location, which sounds odd especially if the position is on the sides.
One fix is to silently adjust the panning when the character's position is updated on startup. Another is to remove the transition time, which seems simpler.