const audioContext = new (window.AudioContext || window.webkitAudioContext)();
function playSound() {
const oscillator = audioContext.createOscillator();
oscillator.type = 'sine';
oscillator.frequency.setValueAtTime(440, audioContext.currentTime); // Frequency in Hz
oscillator.connect(audioContext.destination);
oscillator.start();
oscillator.stop(audioContext.currentTime + 0.1); // Play sound for 0.1 seconds
}
// Call playSound() at appropriate times during sorting