File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -446,6 +446,7 @@ class Oscillator {
446
446
this . stop ( now ) ;
447
447
this . disconnect ( ) ;
448
448
this . panner . dispose ( ) ;
449
+ this . panner = null ;
449
450
this . oscillator = null ;
450
451
}
451
452
// if it is a Pulse
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ if (typeof ac.createStereoPanner !== 'undefined') {
43
43
let time = tFromNow || 0 ;
44
44
this . stereoPanner . pan . linearRampToValueAtTime (
45
45
val ,
46
- this . ac . currentTime + 0.02 + time
46
+ this . ac . currentTime + time
47
47
) ;
48
48
} else if ( typeof val !== 'undefined' ) {
49
49
val . connect ( this . stereoPanner . pan ) ;
@@ -157,6 +157,29 @@ if (typeof ac.createStereoPanner !== 'undefined') {
157
157
this . output . disconnect ( ) ;
158
158
}
159
159
}
160
+
161
+ dispose ( ) {
162
+ if ( this . input ) {
163
+ this . input . disconnect ( ) ;
164
+ delete this . input ;
165
+ }
166
+ if ( this . output ) {
167
+ this . output . disconnect ( ) ;
168
+ delete this . output ;
169
+ }
170
+ if ( this . left ) {
171
+ this . left . disconnect ( ) ;
172
+ delete this . left ;
173
+ }
174
+ if ( this . right ) {
175
+ this . right . disconnect ( ) ;
176
+ delete this . right ;
177
+ }
178
+ if ( this . splitter ) {
179
+ this . splitter . disconnect ( ) ;
180
+ delete this . splitter ;
181
+ }
182
+ }
160
183
}
161
184
panner = Panner ;
162
185
}
You can’t perform that action at this time.
0 commit comments