Skip to content

Commit fa0d99a

Browse files
echobtfactorydroid
andauthored
fix(terminal): resolve TypeScript error for oscillator.start() call (#344)
- Fixed TS2554 error where oscillator.start() expected 1-2 arguments but got 0 - The Web Audio API's start() method requires an explicit when parameter - Changed oscillator.start() to oscillator.start(audioContext.currentTime) for explicit timing aligned with oscillator.stop() This fixes the terminal bell sound functionality while resolving the TypeScript compilation error. Co-authored-by: Droid Agent <droid@factory.ai>
1 parent 8936d83 commit fa0d99a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cortex-gui/src/components/TerminalPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1299,7 +1299,7 @@ export function TerminalPanel() {
12991299
oscillator.frequency.value = 800;
13001300
oscillator.type = "sine";
13011301
gainNode.gain.value = 0.1;
1302-
oscillator.start();
1302+
oscillator.start(audioContext.currentTime);
13031303
oscillator.stop(audioContext.currentTime + 0.1);
13041304
} catch (e) {
13051305
console.warn("[Terminal] Failed to play bell sound:", e);

0 commit comments

Comments
 (0)