/** * Internet radio — stream a free station while you work. Ported from gg-boss's * radio so the gg-app windows offer the same curated, royalty-free, no-API-key * streams (SomaFM started in 2000, Radio Paradise in 2006). * * Playback uses module-level singletons (`currentChild` / `currentStationId`), * so in the shared gg-app daemon — where every window's session lives in ONE * process — radio is APP-WIDE: there is a single stream across all windows. * Starting a station in any window replaces whatever was playing, and every * window's footer reflects the same state. This intentionally prevents * duplicate audio across windows. (To restore per-window radio, key playback * by sessionId instead of these module globals.) * * Player binary detection: mpv > ffplay > mpg123 > cvlc. macOS's built-in * afplay isn't a streaming player, so users without any of those get a one-line * "install mpv" hint and the request no-ops gracefully. * * One station at a time — switching stations or selecting "off" kills the * existing player process before spawning a new one. */ export interface RadioStation { /** Stable identifier used by the picker + state. */ id: string; /** Display name in the picker. */ name: string; /** Short subtitle shown next to the name. */ description: string; /** Direct stream URL — must be MP3/AAC/Ogg, anything mpv handles. */ url: string; } export declare const RADIO_STATIONS: readonly RadioStation[]; export declare function getCurrentStation(): string | null; export declare function getRadioVolume(): number; /** * Stop whatever's currently playing. Idempotent — safe to call when nothing * is playing. Sends SIGTERM (graceful), child cleans up the audio device. */ export declare function stopRadio(): void; export interface PlayResult { ok: boolean; /** Friendly error to surface to the user when ok=false. */ error?: string; } /** Set app-wide radio volume without interrupting a live stream. */ export declare function setRadioVolume(volume: number): PlayResult; /** * Spawn a streaming player for the given station. If one is already playing, * it's killed first. Returns ok=false with a hint if no compatible player is * installed — caller should surface the error to the user. */ export declare function playRadio(stationId: string): PlayResult; //# sourceMappingURL=radio.d.ts.map