Skip to content

Commit

Permalink
prevent rotate sound when not playing, see #233
Browse files Browse the repository at this point in the history
  • Loading branch information
jbphet committed Dec 17, 2019
1 parent 4482362 commit a7b2586
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions js/moleculesandlight/view/MoleculesAndLightScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,12 +269,14 @@ define( require => {
// molecule rotating sounds
const rotateClockwiseSoundPlayer = new SoundClip( rotationClockwiseSoundInfo, {
initialOutputLevel: 0.5,
loop: true
loop: true,
enableControlProperties: [ photonAbsorptionModel.runningProperty ]
} );
soundManager.addSoundGenerator( rotateClockwiseSoundPlayer );
const rotateCounterclockwiseSoundPlayer = new SoundClip( rotationCounterclockwiseSoundInfo, {
initialOutputLevel: 0.5,
loop: true
loop: true,
enableControlProperties: [ photonAbsorptionModel.runningProperty ]
} );
soundManager.addSoundGenerator( rotateCounterclockwiseSoundPlayer );

Expand Down

0 comments on commit a7b2586

Please sign in to comment.