(frequency: number, durationSeconds: number)
| 343 | gainNode.connect(audioContext.destination); |
| 344 | |
| 345 | const playTone = (frequency: number, durationSeconds: number) => { |
| 346 | const oscillator = audioContext.createOscillator(); |
| 347 | oscillator.connect(gainNode); |
| 348 | oscillator.frequency.value = frequency; |
| 349 | oscillator.type = "sine"; |
| 350 | oscillator.start(); |
| 351 | oscillator.stop(audioContext.currentTime + durationSeconds); |
| 352 | }; |
| 353 | |
| 354 | playTone(880, 0.12); |
| 355 |
nothing calls this directly
no test coverage detected