About
WinMix is a rust library that allows you to individually change the volume of each program in the Windows Volume Mixer.
For example, you can set the volume of chrome.exe to 0 while leaving other apps alone.
⚠ This libary uses unsafe functions from the windows crate. ⚠
Usage
use winmix::WinMix;
unsafe {
let winmix = WinMix::default();
let sessions = winmix.enumerate()?;
for session in sessions {
println!("pid: {} path: {}", session.pid, session.path);
session.vol.set_mute(true)?;
session.vol.set_mute(false)?;
session.vol.set_master_volume(0.5)?;
session.vol.set_master_volume(1.0)?;
let vol = session.vol.get_master_volume()?;
let is_muted = session.vol.get_mute()?;
println!("Vol: {} Muted: {}", vol, is_muted);
println!();
}
}
License
WinMix was created by UnexomWid. It is licensed under MIT OR Apache 2.
References