1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
//! AVB audio DAC backend.
//!
//! AVB output is implemented via system audio APIs: CoreAudio on macOS,
//! ASIO on Windows by default (disable the `asio` default feature to use
//! WASAPI instead), and ALSA on Linux.
//! Supports 5-channel (XYRGB) and 6-channel (XYRGBI) mapping with auto-detected sample rate.
//!
//! # Hardware requirement: DC-coupled output
//!
//! The X/Y galvo channels carry a position signal whose DC component is
//! meaningful (a static beam sits at a constant voltage). The output interface
//! **must be DC-coupled** — an AC-coupled interface high-pass-filters the
//! signal, so static or slow-moving geometry drifts back toward centre. This is
//! the same constraint as the oscilloscope backend.
//!
//! # Discovery heuristic
//!
//! Any output device exposing at least five channels ([`backend`]'s
//! `MIN_CHANNELS`) is offered as a candidate laser DAC, minus an explicit
//! name blacklist. This is deliberately permissive: AVB laser interfaces
//! present as generic multichannel audio devices with no reliable
//! machine-readable "I am a laser DAC" marker, so erring toward offering a
//! device (which the user can ignore) is preferable to hiding a real DAC.
//! The trade-off is that unrelated ≥5-channel outputs (7.1 onboard audio,
//! some HDMI sinks) may also appear. Tighten via `is_blacklisted_device`
//! rather than by changing the channel-count floor.
//!
//! # Windows enumeration caveats
//!
//! - ASIO exposes one device per interface that aggregates every AVB stream
//! into a single channel bank, so a multi-stream interface (e.g. RME
//! Digiface AVB) appears as a single candidate. Output always starts at
//! channel 1; addressing a laser on a higher channel bank is not yet
//! supported.
//! - WASAPI (shared mode) only exposes each endpoint at the channel count
//! configured in Windows sound settings, so an endpoint must be configured
//! for 5.1/7.1 output to pass the >= 5 channel filter.
pub use ;
pub use AvbDiscoverer;
pub use Error;
use crate;
/// Returns default capabilities for AVB DAC output.
///
/// PPS is unconstrained because the backend resamples from the user's PPS
/// to the auto-detected audio device sample rate.
/// Normalize a device name for deterministic comparison.
pub
/// Exact device names (matched case-insensitively) that are definitely *not*
/// laser DACs, even though they may expose enough channels to pass the
/// channel-count filter.
const BLACKLISTED_DEVICE_NAMES: & = &;
/// Returns `true` when the device name matches a known non-laser audio device.
pub