C2LC-329: Panning effect disappears for the first movement in a program after page reload

Metadata

Source
C2LC-329
Type
Bug
Priority
N/A
Status
Done
Resolution
N/A
Assignee
N/A
Reporter
Created
2021-04-01T16:04:08.900-0400
Updated
2021-04-06T14:36:30.189-0400
Versions
N/A
Fixed Versions
  1. Coding Env 0.7
Component
N/A

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.