File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
apps/common-app/src/examples Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,10 @@ const Piano: FC = () => {
30
30
} ) ;
31
31
32
32
notesRef . current = newNotes as Record < KeyName , PianoNote > ;
33
+
34
+ return ( ) => {
35
+ audioContextRef . current ?. close ( ) ;
36
+ } ;
33
37
} , [ ] ) ;
34
38
35
39
return (
Original file line number Diff line number Diff line change @@ -49,9 +49,6 @@ class PianoNote {
49
49
50
50
this . oscillator . stop ( tNow + 0.1 ) ;
51
51
52
- this . gain . disconnect ( this . audioContext . destination ) ;
53
- this . oscillator . disconnect ( this . gain ) ;
54
-
55
52
this . oscillator = null ;
56
53
this . gain = null ;
57
54
}
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ class HiHat implements SoundEngine {
41
41
gain . gain . exponentialRampToValueAtTime ( this . volume * 0.33 , time + 0.03 ) ;
42
42
gain . gain . exponentialRampToValueAtTime ( this . volume * 0.0001 , time + 0.3 ) ;
43
43
gain . gain . setValueAtTime ( 0 , time + 0.3 + 0.001 ) ;
44
- //number of inputs of filter is 1 on android- check it
44
+
45
45
oscillator . connect ( bandpassFilter ) ;
46
46
bandpassFilter . connect ( highpassFilter ) ;
47
47
highpassFilter . connect ( gain ) ;
You can’t perform that action at this time.
0 commit comments