Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pressing 'Reset All' produces sound of last sim element with Studio #165

Open
Nancy-Salpepi opened this issue Feb 22, 2022 · 2 comments
Open

Comments

@Nancy-Salpepi
Copy link

Test device
MacBook Air (m1 chip)

Operating System
12.2.1

Browser
Chrome

Problem description
Seen when testing https://github.com/phetsims/phet-io/issues/1626 in master:

In the Studio wrapper, the launched sim will produce sound when the Reset All button is pressed. It will not produce the Reset All button sound.

Also similar to what I reported for GFL phetsims/gravity-force-lab#284 (comment) and Faraday's Law phetsims/faradays-law#222 (comment).

I am not assigning to anyone at this time (MK's suggestion).

Steps to reproduce

  1. In Studio: generate sound by moving the slider for Voltage or Resistance.
  2. Once the sound has stopped, launch the sim.
  3. Press the reset button.

Visuals

ohms.law.mov
@Nancy-Salpepi
Copy link
Author

The behavior is not the same in the State wrapper: With Set State Rate = 0, if I generate sound in the downstream sim by moving the sliders and then press Reset All--no sound is generated.

However, sound is generated if I:

  1. Set state rate = 0
  2. Generate sound in downstream sim by moving sliders
  3. Press the "Set State Now" button

Also similar to what I see in GFL and Faraday's law.

@zepumph
Copy link
Member

zepumph commented Feb 22, 2022

Yeah, this is one of those classic "hard state/sound" clashes to deal with. The model moved, but it isn't based on user input. Likely the solution is to have sound based on user-controlled elements instead of the model, so that when model Properties change because of state setting, we won't hear that sound. Thanks for the good labels, this should be tackled upon next work in the repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants