File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ if (typeof ac.createStereoPanner !== 'undefined') {
5656 this . input = ac . createGain ( ) ;
5757 input . connect ( this . input ) ;
5858
59+ this . panValue = 0 ;
5960 this . left = ac . createGain ( ) ;
6061 this . right = ac . createGain ( ) ;
6162 this . left . channelInterpretation = 'discrete' ;
@@ -81,6 +82,7 @@ if (typeof ac.createStereoPanner !== 'undefined') {
8182
8283 // -1 is left, +1 is right
8384 pan ( val , tFromNow ) {
85+ this . panValue = val ;
8486 var time = tFromNow || 0 ;
8587 var t = ac . currentTime + time ;
8688 var v = ( val + 1 ) / 2 ;
@@ -90,6 +92,10 @@ if (typeof ac.createStereoPanner !== 'undefined') {
9092 this . right . gain . linearRampToValueAtTime ( rightVal , t ) ;
9193 }
9294
95+ getPan ( ) {
96+ return this . panValue ;
97+ }
98+
9399 inputChannels ( numChannels ) {
94100 if ( numChannels === 1 ) {
95101 this . input . disconnect ( ) ;
You can’t perform that action at this time.
0 commit comments