Skip to content

Commit

Permalink
use ResetAllButton.isResettingAllProperty to mute sound during resets…
Browse files Browse the repository at this point in the history
…, see #328
  • Loading branch information
jbphet committed Apr 12, 2024
1 parent 9d9d038 commit 7da2777
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions js/view/GFLBScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,11 @@ class GFLBScreenView extends ScreenView {
soundManager.addSoundGenerator( new MassSoundGenerator(
model.object1.valueProperty,
GFLBConstants.MASS_RANGE,
model.resetInProgressProperty,
{ initialOutputLevel: 0.7 }
) );
soundManager.addSoundGenerator( new MassSoundGenerator(
model.object2.valueProperty,
GFLBConstants.MASS_RANGE,
model.resetInProgressProperty,
{ initialOutputLevel: 0.7 }
) );

Expand All @@ -253,7 +251,7 @@ class GFLBScreenView extends ScreenView {
initialOutputLevel: 0.2,
playbackRateRange: new Range( 0.6, 2.1 ), // down about 2 semitones, necessary to match original sound design
normalizationMappingExponent: 0.25, // more pitch change in lower portion of range
enableControlProperties: [ DerivedProperty.not( model.resetInProgressProperty ) ],
enableControlProperties: [ DerivedProperty.not( ResetAllButton.isResettingAllProperty ) ],
trimSilence: false // a very precise sound file is used, so make sure it doesn't get changed
}
);
Expand Down

0 comments on commit 7da2777

Please sign in to comment.