From c5f0a0df6d50afe813bd66b5b531e6fdb89d1d25 Mon Sep 17 00:00:00 2001 From: jbphet Date: Fri, 27 May 2022 14:04:25 -0600 Subject: [PATCH] sound player instead of sound generator for slider sounds, see https://github.com/phetsims/sun/issues/697 --- js/common/view/ConcentrationControlPanel.ts | 1 - js/common/view/ConcentrationSliderSoundGenerator.ts | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/js/common/view/ConcentrationControlPanel.ts b/js/common/view/ConcentrationControlPanel.ts index ec786ee7..71ef9ea6 100644 --- a/js/common/view/ConcentrationControlPanel.ts +++ b/js/common/view/ConcentrationControlPanel.ts @@ -347,7 +347,6 @@ class ConcentrationSlider extends Node { concentrationModel.concentrationProperty, sliderRange ); - soundManager.addSoundGenerator( sliderSoundGenerator ); const slider = new VSlider( concentrationModel.manuallyControlledConcentrationProperty, sliderRange, { trackSize: new Dimension2( 1, CONCENTRATION_SLIDER_TRACK_HEIGHT ), diff --git a/js/common/view/ConcentrationSliderSoundGenerator.ts b/js/common/view/ConcentrationSliderSoundGenerator.ts index a3c443a1..6dc4138a 100644 --- a/js/common/view/ConcentrationSliderSoundGenerator.ts +++ b/js/common/view/ConcentrationSliderSoundGenerator.ts @@ -8,7 +8,7 @@ */ import SoundClip from '../../../../tambo/js/sound-generators/SoundClip.js'; -import ValueChangeSoundGenerator from '../../../../tambo/js/sound-generators/ValueChangeSoundGenerator.js'; +import ValueChangeSoundPlayer from '../../../../tambo/js/sound-generators/ValueChangeSoundPlayer.js'; import soundManager from '../../../../tambo/js/soundManager.js'; import Range from '../../../../dot/js/Range.js'; import greenhouseEffect from '../../greenhouseEffect.js'; @@ -18,7 +18,7 @@ import dotRandom from '../../../../dot/js/dotRandom.js'; import IReadOnlyProperty from '../../../../axon/js/IReadOnlyProperty.js'; import ISoundPlayer from '../../../../tambo/js/ISoundPlayer.js'; -class ConcentrationSliderSoundGenerator extends ValueChangeSoundGenerator { +class ConcentrationSliderSoundGenerator extends ValueChangeSoundPlayer { constructor( concentrationProperty: IReadOnlyProperty, valueRange: Range ) {