Verbosely report all gain changes

Just reporting the first nonzero change isn't really useful. Be spammy,
we can always reduce this later.

Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
Hector Martin 2023-10-13 13:34:46 +09:00
parent ffa5af391d
commit f382ce7a5c

View file

@ -242,10 +242,10 @@ fn main() {
.reduce(f32::min)
.unwrap();
if gain != group.gain {
if group.gain == 0. {
warn!("Speaker group {} gain limited to {}", idx, gain);
} else if gain == 0. {
if gain == 0. {
info!("Speaker group {} gain nominal", idx);
} else {
info!("Speaker group {} gain limited to {:.2} dBFS", idx, gain);
}
group.speakers.iter_mut().for_each(|s| s.update(&ctl, gain));
group.gain = gain;