// SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie // SPDX-License-Identifier: MIT //! What a Player asks of a backend. A backend is a namespace with a `Stream` //! type, an `Error` set, and `open`, `close`, `pause` and `unpause`. const std = @import("std"); /// Pull-mode audio: called on the backend's own thread once a cycle, with one /// plane per channel, each `frames` long, every one of which has to be filled. /// zig-pipewire and zig-wsapi both take exactly this. pub const Process = struct { ctx: *anyopaque, func: *const fn (ctx: *anyopaque, planes: []const []f32, frames: u32) void, }; pub const StreamOptions = struct { /// Shown in the system's volume mixer. name: []const u8, /// How PipeWire's socket is found; ignored elsewhere. environ: ?std.process.Environ, rate: u32, channels: u16, process: Process, };