Files
ChatApp/apps/desktop/native/audio-loopback/index.d.ts
T
byGalax 825160ee46 feat(desktop): port v0.11.4-v0.15.2 from Tauri to Electron + Discord-parity audio (v0.16.0)
Chronological port of every Tauri release commit (v0.11.4 -> v0.15.2)
into the Electron rebuild, plus Discord-style audio handling that goes
beyond the Tauri original.

Highlights:
  - All 17 Tauri release commits ported (audio fixes, custom notification
    sound, Discord-style chat UX, profile banner, changelog page,
    Discord-parity call UX, screen-share echo + re-watch UX, audio-loop
    fix).
  - Native napi-rs audio-loopback addon with WASAPI process-loopback:
      * EXCLUDE_TARGET_PROCESS_TREE for full-screen shares -> peers
        never hear themselves echoed back through the capture.
      * INCLUDE_TARGET_PROCESS_TREE for window shares -> only the
        picked window's audio is captured, not the whole OS mixer
        (Discord parity).
      * HWND -> PID resolution via Win32 GetWindowThreadProcessId.
  - Discord-style screen-source picker (thumbnail grid, screens vs
    apps tabs, live-refreshing thumbnails).
  - Hash routing fix for packaged builds (file:// can't resolve
    BrowserRouter paths).
  - Tauri sources removed (apps/desktop/src-tauri).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 23:35:01 +02:00

36 lines
1.5 KiB
TypeScript

/* tslint:disable */
/* eslint-disable */
/* auto-generated by NAPI-RS */
/**
* Start a process-loopback capture that excludes the current process
* tree. The supplied JS callback is invoked from a background thread
* with one argument: a Float32Array of interleaved f32 stereo samples
* at 48kHz. Returns a numeric capture id that must be passed to
* `stopCapture` when the share ends.
*
* Always excludes `std::process::id()` (whole-OS-mixer-minus-self).
* For "include only this app" use `start_capture_for_pid` instead.
*/
export declare function startCapture(callback: (...args: any[]) => any): number
/**
* Start a process-loopback capture that INCLUDES the target PID's
* process tree (and only that tree) — the WASAPI
* INCLUDE_TARGET_PROCESS_TREE mode. Used for window-shares where we
* want only the picked app's audio (Discord parity).
*/
export declare function startCaptureForPid(pid: number, callback: (...args: any[]) => any): number
/**
* Resolve the owning process id of a top-level window handle. The
* renderer derives `hwnd` from desktopCapturer's `window:<HWND>:0`
* source ids and we hand that to `start_capture_for_pid`.
*/
export declare function resolveWindowPid(hwnd: number): number
/**
* Tear down the capture for the given id. Safe to call on a missing id
* (no-op) so the JS side doesn't have to track whether the stop has
* already been issued by the screen-share teardown path.
*/
export declare function stopCapture(captureId: number): void