File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -638,6 +638,11 @@ export async function playTimeWarning(): Promise<void> {
638638 soundToPlay . play ( ) ;
639639}
640640
641+ export async function clearAllSounds ( ) : Promise < void > {
642+ const Howl = ( await gethowler ( ) ) . Howler ;
643+ Howl . stop ( ) ;
644+ }
645+
641646function playNote (
642647 codeOverride ?: string ,
643648 oscillatorTypeOverride ?: SupportedOscillatorTypes ,
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import * as CustomText from "./custom-text";
1212import * as CustomTextState from "../states/custom-text-name" ;
1313import * as TestStats from "./test-stats" ;
1414import * as PractiseWords from "./practise-words" ;
15+ import * as SoundController from "../controllers/sound-controller" ;
1516import * as ShiftTracker from "./shift-tracker" ;
1617import * as AltTracker from "./alt-tracker" ;
1718import * as Focus from "./focus" ;
@@ -297,6 +298,7 @@ export function restart(options = {} as RestartOptions): void {
297298 TestUI . reset ( ) ;
298299 CompositionState . setComposing ( false ) ;
299300 CompositionState . setData ( "" ) ;
301+ void SoundController . clearAllSounds ( ) ;
300302
301303 if ( TestState . resultVisible ) {
302304 if ( Config . randomTheme !== "off" ) {
You can’t perform that action at this time.
0 commit comments