mirror of
https://github.com/ivabus/speakersafetyd
synced 2024-11-22 16:25:06 +03:00
main: Reset gains to 0dB on startup
This is mostly to avoid a sudden jump up in volume on the common case where the first sound happens after enough catchup has occurred (once we implement catchup...) Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
3660fd85d8
commit
5c1fd2b60b
1 changed files with 5 additions and 0 deletions
|
@ -162,6 +162,11 @@ fn main() {
|
|||
|
||||
unlock_elem.write_int(&ctl, UNLOCK_MAGIC);
|
||||
|
||||
for (idx, group) in groups.iter_mut() {
|
||||
group.speakers.iter_mut().for_each(|s| s.update(&ctl, 0.0));
|
||||
group.gain = 0.0;
|
||||
}
|
||||
|
||||
loop {
|
||||
// Block while we're reading into the buffer
|
||||
io.readi(&mut buf).unwrap();
|
||||
|
|
Loading…
Reference in a new issue