// SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie // SPDX-License-Identifier: MIT //! WASAPI in shared mode, through zig-wsapi. The stream is in the alerts //! category, and follows the default device when it changes. const std = @import("std"); const wasapi = @import("wasapi"); const StreamOptions = @import("options.zig").StreamOptions; pub const Stream = wasapi.Stream; pub const Error = wasapi.errors.OpenError; pub fn open(gpa: std.mem.Allocator, io: std.Io, options: StreamOptions) Error!*Stream { return wasapi.Stream.open(gpa, io, .{ .name = options.name, .channels = options.channels, .rate = options.rate, .role = .notification, .process = .{ .ctx = options.process.ctx, .func = options.process.func }, }); } pub fn close(stream: *Stream, io: std.Io) void { stream.close(io); } pub fn pause(stream: *Stream) void { stream.pause(); } pub fn unpause(stream: *Stream) void { stream.unpause(); }