phetsims / wave-interference

"Wave Interference" is an educational simulation in HTML5, by PhET Interactive Simulations.
MIT License
18 stars 5 forks source link

soundManager.enabledProperty listeners do not fire #524

Open pixelzoom opened 3 years ago

pixelzoom commented 3 years ago

https://github.com/phetsims/joist/issues/724 made big changes to audio, and caused soundManager.enabledProperty listeners to stop firing. There are 2 such listeners in WaveInterferenceConrolPanel.js.

In https://github.com/phetsims/joist/issues/724#issuecomment-875207660, @jessegreenberg said:

@pixelzoom @samreid - As a temporary workaround the "sound" query parameter is now used to set the initial value of sim.allAudioEnabledProperty. If listeners link to phet.joist.sim.allAudioEnabledProperty instead of soundManager.enabledProperty it will work as before until we have a better fix.

samreid commented 3 years ago

I'll take a closer look when we return attention to this sim.

jessegreenberg commented 2 years ago

After changes in https://github.com/phetsims/joist/issues/724, the change that you likely want to apply is to replace links to soundManager.enabledProperty with audioManager.audioAndSoundEnabledProperty so that the checkboxes controlling output of sound in the Sim UI are only enabled if it is possible for the soundManager to have output.