Skip to content

Commit

Permalink
fix soundManager.getOutputLevelForCategory, #136
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Apr 15, 2021
1 parent 14932da commit 213cf58
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions js/soundManager.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018-2020, University of Colorado Boulder
// Copyright 2021, University of Colorado Boulder

/**
* A singleton object that registers sound generators, connects them to the audio output, and provides a number of
Expand Down Expand Up @@ -502,9 +502,10 @@ class SoundManager extends PhetioObject {
}

// verify that the specified category exists
assert && assert( this.gainNodesForCategories[ categoryName ], `no category with name = ${categoryName}` );
const gainNode = this.gainNodesForCategories[ categoryName ]; // {GainNode}
assert && assert( gainNode, `no category with name = ${categoryName}` );

return this.gainNodesForCategories[ categoryName ].value;
return gainNode.gain.value;
}

/**
Expand Down

0 comments on commit 213cf58

Please sign in to comment.