import { debug } from '@/lib/debug'; export function playNotificationSound() { try { const audioContext = new (window.AudioContext || (window as unknown as { webkitAudioContext: typeof AudioContext }).webkitAudioContext)(); const oscillator = audioContext.createOscillator(); const gainNode = audioContext.createGain(); oscillator.connect(gainNode); gainNode.connect(audioContext.destination); oscillator.frequency.value = 800; oscillator.type = 'sine'; gainNode.gain.value = 0.1; oscillator.start(); oscillator.stop(audioContext.currentTime + 0.15); oscillator.onended = () => audioContext.close(); } catch (e) { debug.log('Could not play notification sound:', e); } }