Skip to content

Commit 5a338ef

Browse files
Stop the oscillator on board stop.
Otherwise music.pitch plays forever until you stop it with code.
1 parent 61c02c8 commit 5a338ef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/board/audio/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ export class Audio {
138138
}
139139
}
140140

141-
boardStopped() {}
141+
boardStopped() {
142+
this.oscillator?.stop();
143+
}
142144
}
143145

144146
class BufferedAudio {

0 commit comments

Comments
 (0)