fix: await first playBeep in sound sequences

This commit is contained in:
Mikhail Kiselev
2026-02-10 16:53:40 +03:00
parent 906f504d49
commit 482786a34b
2 changed files with 8 additions and 8 deletions

View File

@@ -144,22 +144,22 @@
}
}
function playSound(name) {
async function playSound(name) {
switch (name) {
case 'warning':
// Two short warning beeps
playBeep(880, 0.15)
await playBeep(880, 0.15)
setTimeout(() => playBeep(880, 0.15), 200)
break
case 'timeup':
// Descending tone sequence
playBeep(1200, 0.2)
await playBeep(1200, 0.2)
setTimeout(() => playBeep(900, 0.2), 250)
setTimeout(() => playBeep(600, 0.3), 500)
break
case 'meeting_end':
// Final chime - three notes
playBeep(523, 0.2) // C5
await playBeep(523, 0.2) // C5
setTimeout(() => playBeep(659, 0.2), 200) // E5
setTimeout(() => playBeep(784, 0.4), 400) // G5
break