phetsims / fourier-making-waves

"Fourier: Making Waves" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
6 stars 3 forks source link

Should sound stop when the sim is paused? #190

Closed KatieWoe closed 3 years ago

KatieWoe commented 3 years ago

Test device Dell Operating System Win 10 Browser Chrome Problem description For https://github.com/phetsims/qa/issues/711. When the sim is paused, the sound of the wave does not stop. This is especially noticeable when the wave is moving.

Visuals

https://user-images.githubusercontent.com/41024075/135146786-6a52d05a-132a-4740-ab18-29b88e1fe955.MOV

Troubleshooting information:

!!!!! DO NOT EDIT !!!!! Name: ‪Fourier: Making Waves‬ URL: https://phet-dev.colorado.edu/html/fourier-making-waves/1.0.0-rc.1/phet/fourier-making-waves_all_phet.html Version: 1.0.0-rc.1 2021-09-28 15:44:23 UTC Features missing: applicationcache, applicationcache, touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36 Language: en-US Window: 1280x600 Pixel Ratio: 1.5/1 WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium) GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 30 uniform: 4096 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 32767x32767 OES_texture_float: true Dependencies JSON: {}
pixelzoom commented 3 years ago

This is a design issue, so assigning to @arouinfar.

My 2 cents... I think it's going to be confusing for sound to stop when the sound checkbox is still checked. So if we do stop sound when the sim is paused, then we should also disable the sound controls, as we do when sound is turned off via the navigation bar.

pixelzoom commented 3 years ago

I'll also point out that this is only an issue when the domain is "space & time". So that makes it even more complicated. If the sim is paused in "space & time", and the user switches to "space", what do we do? Do we resume sound even though the times controls (which are now disabled) is set to pause? Or do we make them switch back to "space & time", resume playing the sim, then switch back to "space".

Imo this is a can of worms. And good that we might do by changing the behavior is liable to result in even greater confusion.

pixelzoom commented 3 years ago

Raising priority to high. A decision on this is needed before we can proceed with the next Fourier RC.

arouinfar commented 3 years ago

@KatieWoe you raise a good question.

Generally, I would expect the sound to pause if its origin paused. In Waves Intro, pausing the sim will also pause the sound associated with the "Play Tone" checkbox because the cause of the sound (oscillating speaker membrane) has paused. However, general UI sounds (checkboxes, sliders, etc.) will still play.

Things are a bit different in this sim. The sound associated with the sound checkbox represents the harmonics currently displayed in the Harmonics graph. In f(x) and f(t) modes the content is static and is analogous to a paused state in f(x,t) mode. I agree with @pixelzoom's assessment in https://github.com/phetsims/fourier-making-waves/issues/190#issuecomment-929540907. I don't think we need to pause the sound of the harmonics when the sim is paused. Closing.