mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-12-29 03:20:46 +08:00
provided codeOverride for playClick so that settings will properly be able to preview certain sounds (#4246) jerryzhou196
This commit is contained in:
parent
9776907343
commit
7ee47a83f2
2 changed files with 3 additions and 3 deletions
|
|
@ -474,7 +474,7 @@ export function playNote(
|
|||
oscillatorNode.stop(audioCtx.currentTime + 0.5);
|
||||
}
|
||||
|
||||
export function playClick(): void {
|
||||
export function playClick(codeOverride?: string): void {
|
||||
if (Config.playSoundOnClick === "off") return;
|
||||
|
||||
if (Config.playSoundOnClick in scaleConfigurations) {
|
||||
|
|
@ -487,7 +487,7 @@ export function playClick(): void {
|
|||
}
|
||||
|
||||
if (Config.playSoundOnClick in clickSoundIdsToOscillatorType) {
|
||||
playNote();
|
||||
playNote(codeOverride ?? undefined);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ async function initGroups(): Promise<void> {
|
|||
UpdateConfig.setPlaySoundOnClick,
|
||||
"button",
|
||||
() => {
|
||||
if (Config.playSoundOnClick !== "off") Sound.playClick();
|
||||
if (Config.playSoundOnClick !== "off") Sound.playClick("KeyQ");
|
||||
}
|
||||
);
|
||||
groups["showAllLines"] = new SettingsGroup(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue