phetsims / quadrilateral

"Quadrilateral" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
1 stars 3 forks source link

When continuous sounds are heard with checkbox is inconsistent #327

Closed Nancy-Salpepi closed 1 year ago

Nancy-Salpepi commented 1 year ago

Test device iPad 9th generation and mac

Operating System iOS 16.1.1 and macOS 13.1

Browser safari

Problem description For https://github.com/phetsims/qa/issues/879, with 'Play Shapes Sounds forever....' checked in the preferences menu, if I uncheck and then recheck the sounds checkbox in the sim, sometimes I hear sound and sometimes I don't.

Steps to reproduce

  1. Check the Play Shape Sounds forever checkbox in the Audio tab of the Preferences menu
  2. Move side BC to the right
  3. Uncheck the Sounds checkbox in the sim
  4. Move side BC to the right again
  5. Check the Sounds checkbox --you will hear sound
  6. Uncheck and then recheck the Sounds checkbox--you will not hear sound

Visuals

https://user-images.githubusercontent.com/87318828/211877166-073a9809-bc4d-44b4-8ea2-2456645738ee.mov

Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Quadrilateral‬ URL: https://phet-dev.colorado.edu/html/quadrilateral/1.0.0-dev.73/phet/quadrilateral_all_phet.html Version: 1.0.0-dev.73 2023-01-08 23:48:12 UTC Features missing: applicationcache, applicationcache, touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.2 Safari/605.1.15 Language: en-US Window: 1388x714 Pixel Ratio: 2/1 WebGL: WebGL 1.0 GLSL: WebGL GLSL ES 1.0 (1.0) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 30 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 16384x16384 OES_texture_float: true Dependencies JSON: {}
jessegreenberg commented 1 year ago

Interesting, thanks @Nancy-Salpepi. I think the correct behavior is that sounds should NOT play when you check the checkbox, until you change the shape again. Ill go ahead with that.

brettfiedler commented 1 year ago

I agree. Even with the Tracks Play Forever enabled, if you check and uncheck that share Sound checkbox, sound should only play again when you move the shape.

jessegreenberg commented 1 year ago

Over slack @Nancy-Salpepi thought of a good point to think through.

if I have the sounds checked in the sim and the continuous sounds checked as well-- then I shut off Sounds or All Audio and turn them back on — I hear sound. So if you make the change you proposed above, would you have to change those as well?

@BLFiedler with this thought would you change your comment above?

jessegreenberg commented 1 year ago

Thinking about it a bit, I am OK with the difference. I think it is good that general Audio and Sound controls in preferences don't start/stop ambient sounds. But it is best that shape music should only play after changing the shape. But curious what @BLFiedler thinks.

brettfiedler commented 1 year ago

I'm pretty sure I agree with @jessegreenberg's last statement, but let's check in at our next meeting quickly to sanity check.

brettfiedler commented 1 year ago

We are all okay with this. The checkbox serves to "turn off" the sonification ("shapes changes" in Voicing). Whereas, the Audio off (or pref menu) is more like muting the sounds, resuming when you've turned it back on.

brettfiedler commented 1 year ago

WAIT. Actually, the checkbox is inconsistent, which is what NS was pointing out. Let's make sure the checkbox stops the sonification (or prevents it if not enabled) every time. Shape sound should not play unless you move the shape when the Shape Sound checkbox is enabled.

Over to JG to fix

jessegreenberg commented 1 year ago

The above is a potential simple fix for this. Now we strop all tracks and reset the player when shape sounds are disabled OR enabled so that in order to hear sounds again the shape must be moved.

Closing.

Nancy-Salpepi commented 1 year ago

The above is a potential simple fix for this. Now we strop all tracks and reset the player when shape sounds are disabled OR enabled so that in order to hear sounds again the shape must be moved.

@jessegreenberg does that also refer to when the Shape Sound Options are changed?

jessegreenberg commented 1 year ago

Yes, it should behave the smae for "Shape Sound Options". Is that what you are seeing?

Nancy-Salpepi commented 1 year ago

Yes. I have to move the shape again for sound to resume.

jessegreenberg commented 1 year ago

OK, great. I think this can be closed, please reopen if thats not the case.