Skip to content

Commit ee9ac11

Browse files
committed
chore: added missing file changes
1 parent 707c315 commit ee9ac11

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

workspaces/simon-game/src/app/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export const config = {
22
soundDurationMs: 300,
33
volumePct: 0.1,
4-
buttons: [
4+
boxes: [
55
{
66
color: "red",
77
frequency: 261.63,

workspaces/simon-game/src/app/util/playSound.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ let audioContext: AudioContext | null = null;
66
* @param context - The audio context to use for generating the sound.
77
* @param frequency - The frequency of the sound in Hertz
88
* @param durationMs - The duration of the sound in milliseconds.
9-
* @param volume - The volume of the sound, typically between 0 and 1.
9+
* @param volumePct - The volume of the sound, typically between 0 and 1.
1010
*/
1111
export const playSound = (
1212
frequency: number,
@@ -34,10 +34,7 @@ export const playSound = (
3434
gainNode.gain.setValueAtTime(volumePct, audioContext.currentTime);
3535

3636
// Creates the smooth fades-in / fade-out sound effect (Avoids the popping sounds)
37-
gainNode.gain.linearRampToValueAtTime(
38-
volumePct,
39-
audioContext.currentTime + 0.01,
40-
);
37+
gainNode.gain.linearRampToValueAtTime(volumePct, audioContext.currentTime + 0.01);
4138
gainNode.gain.linearRampToValueAtTime(
4239
0,
4340
audioContext.currentTime + durationMs / 1000 - 0.01,

0 commit comments

Comments
 (0)