How samuelsbenghe/samic works
Samic is a Windows tray app that periodically monitors the selected capture device and, when enforcement is enabled, restores its input volume to 100%. Users can choose the default or an active microphone, refresh the device list, toggle enforcement, and exit from the tray UI. The excerpts show the main thread starting the monitor and UI, shared state carrying settings and status, and the UI reflecting microphone status with tray icons. Unsampled UI code limits detail about some controls and event wiring.
Main entry points: ui.rs Tray and settings UI · audio.rs Device monitor · state.rs Shared state · main.rs App startup
Components 8
App runtime
- App startup
src/main.rs - Shared state
src/state.rs
Tray controls
- Tray and settings UI
src/ui.rs - Status icons
src/icon.rs
Audio monitoring
- Device monitor
src/audio.rs
Other components
- User
- Windows audio endpoints
- Windows notification area
Connections 12
- User → Tray and settings UI: uses
README.md - App startup → Shared state: creates
src/main.rs - App startup → Device monitor: starts monitor
src/main.rs - App startup → Tray and settings UI: runs UI
src/main.rs - Tray and settings UI → Shared state: updates settings
src/ui.rs - Device monitor → Shared state: reads settings
src/audio.rs - Device monitor → Shared state: writes status
src/audio.rs - Tray and settings UI → Shared state: reads status
src/ui.rs - Tray and settings UI → Device monitor: lists devices
src/ui.rs - Device monitor → Windows audio endpoints: resolves and adjusts
src/audio.rs - Tray and settings UI → Status icons: creates icons
src/ui.rs - Tray and settings UI → Windows notification area: updates tray icon
src/ui.rs