Skip to content

Commit

Permalink
Normalize audio levels
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Oct 15, 2019
1 parent 307d7cb commit eb1947b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions js/waves/view/SineWaveGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ define( require => {
const WaveInterferenceConstants = require( 'WAVE_INTERFERENCE/common/WaveInterferenceConstants' );

// constants
const MAX_OUTPUT_LEVEL = 0.4; // valid range is from 0 to 1
const MAX_OUTPUT_LEVEL = 0.07; // valid range is from 0 to 1

// function to map amplitude to output level
// TODO: Ashton - set output level to mix well with other sounds
Expand Down Expand Up @@ -67,9 +67,7 @@ define( require => {
} );

// wire up volume to amplitude
amplitudeProperty.link( amplitude => {
this.setOutputLevel( mapAmplitudeToOutputLevel( amplitude ) );
} );
amplitudeProperty.link( amplitude => this.setOutputLevel( mapAmplitudeToOutputLevel( amplitude ) ) );
}
}

Expand Down

0 comments on commit eb1947b

Please sign in to comment.