Skip to content

Commit

Permalink
re-encode the sound files with increased volume
Browse files Browse the repository at this point in the history
  • Loading branch information
h908714124 committed Oct 29, 2024
1 parent 81d54aa commit 89ef303
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 4 deletions.
Binary file modified src/main/client/public/1.wav
Binary file not shown.
Binary file modified src/main/client/public/2.wav
Binary file not shown.
Binary file modified src/main/client/public/3.wav
Binary file not shown.
Binary file modified src/main/client/public/4.wav
Binary file not shown.
Binary file modified src/main/client/public/5.wav
Binary file not shown.
Binary file modified src/main/client/public/6.wav
Binary file not shown.
Binary file modified src/main/client/public/7.wav
Binary file not shown.
Binary file modified src/main/client/public/8.wav
Binary file not shown.
Binary file modified src/main/client/public/9.wav
Binary file not shown.
7 changes: 3 additions & 4 deletions src/main/client/src/feature/game/Board.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function Board({
let showMoveNumbers = ctrlKeyDown && (isKibitz(gameState, auth) || end)
let howlerActive = useRef(false)

let playSound = useCallback(({file, volume}) => {
let playSound = useCallback(({file}) => {
if (!howlerActive.current) {
return
}
Expand All @@ -80,15 +80,14 @@ export function Board({
if (!howler.current[file]) {
howler.current[file] = new Howl({
src: [base + "/" + file + ".wav"],
volume: volume,
})
}
return howler.current[file].play()
}, [howler, muted])

useEffect(() => {
if (!end && !counting && timeRemaining >= 1 && timeRemaining <= 9) {
playSound({file: "" + timeRemaining, volume: 1})
playSound({file: "" + timeRemaining})
}
}, [playSound, timeRemaining, end, counting])

Expand Down Expand Up @@ -215,7 +214,7 @@ export function Board({
}))
}
resetCountdown()
playSound({file: "stone1", volume: 0.04})
playSound({file: "stone1"})
stompClient.publish({
destination: "/app/game/move",
body: JSON.stringify(move),
Expand Down

0 comments on commit 89ef303

Please sign in to comment.