use crate::orchestrator::Event;
use crate::os::registry::wide;
use windows::core::PCWSTR;
use windows::Win32::Media::Audio::{PlaySoundW, SND_ALIAS, SND_ASYNC, SND_NODEFAULT};
fn alias_for(event: Event) -> &'static str {
match event {
Event::FocusStart | Event::BreakStart => "SystemAsterisk",
Event::FocusEnd | Event::BreakEnd => "SystemExclamation",
}
}
pub fn play(event: Event) {
let w = wide(alias_for(event));
unsafe {
let _ = PlaySoundW(
PCWSTR(w.as_ptr()),
None,
SND_ALIAS | SND_ASYNC | SND_NODEFAULT,
);
}
}