mirror of
https://github.com/ivabus/speakersafetyd
synced 2024-11-10 02:15:16 +03:00
main: Log blackbox speaker groups in integer order
For consistency. Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
368be9d7df
commit
315255a7e0
|
@ -273,9 +273,9 @@ fn main() {
|
||||||
last_update = now;
|
last_update = now;
|
||||||
|
|
||||||
if let Some(bb) = blackbox_ref.as_mut() {
|
if let Some(bb) = blackbox_ref.as_mut() {
|
||||||
let gstates = groups
|
let max_idx = *groups.iter().map(|g| g.0).max().unwrap();
|
||||||
.iter()
|
let gstates = (0..=max_idx)
|
||||||
.map(|g| g.1.speakers.iter().map(|s| s.s.clone()).collect())
|
.map(|i| groups[&i].speakers.iter().map(|s| s.s.clone()).collect())
|
||||||
.collect();
|
.collect();
|
||||||
bb.push(sample_rate, buf.clone(), gstates);
|
bb.push(sample_rate, buf.clone(), gstates);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue