MCPcopy
hub / github.com/callumalpass/tasknotes / playTone

Method playTone

src/ui/NotificationService.ts:345–352  ·  view source on GitHub ↗
(frequency: number, durationSeconds: number)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

createOscillatorMethod · 0.80
startMethod · 0.65
stopMethod · 0.65

Tested by

no test coverage detected