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') {
56
56
this . input = ac . createGain ( ) ;
57
57
input . connect ( this . input ) ;
58
58
59
+ this . panValue = 0 ;
59
60
this . left = ac . createGain ( ) ;
60
61
this . right = ac . createGain ( ) ;
61
62
this . left . channelInterpretation = 'discrete' ;
@@ -81,6 +82,7 @@ if (typeof ac.createStereoPanner !== 'undefined') {
81
82
82
83
// -1 is left, +1 is right
83
84
pan ( val , tFromNow ) {
85
+ this . panValue = val ;
84
86
var time = tFromNow || 0 ;
85
87
var t = ac . currentTime + time ;
86
88
var v = ( val + 1 ) / 2 ;
@@ -90,6 +92,10 @@ if (typeof ac.createStereoPanner !== 'undefined') {
90
92
this . right . gain . linearRampToValueAtTime ( rightVal , t ) ;
91
93
}
92
94
95
+ getPan ( ) {
96
+ return this . panValue ;
97
+ }
98
+
93
99
inputChannels ( numChannels ) {
94
100
if ( numChannels === 1 ) {
95
101
this . input . disconnect ( ) ;
You can’t perform that action at this time.
0 commit comments