pub fn shared() -> Option<&'static AudioBell>Expand description
The process-wide audio output, opened lazily on first use.
Opening an output device per pane is both wasteful — a terminal needs one
output, not one per pane — and, on Windows, unsound: opening a device sink,
letting the opening thread exit, then opening another from a second thread
faults inside WASAPI with STATUS_ACCESS_VIOLATION. Sharing a single device
for the life of the process avoids the re-open entirely.
Returns None when no output device could be opened (headless CI, no sound
card, audio feature disabled at build time); callers treat that as “no bell”.