From 315255a7e082398842ab0507797a9205a3164d02 Mon Sep 17 00:00:00 2001 From: Hector Martin Date: Mon, 23 Oct 2023 02:48:24 +0900 Subject: [PATCH] main: Log blackbox speaker groups in integer order For consistency. Signed-off-by: Hector Martin --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 7d5d366..ea13ef2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -273,9 +273,9 @@ fn main() { last_update = now; if let Some(bb) = blackbox_ref.as_mut() { - let gstates = groups - .iter() - .map(|g| g.1.speakers.iter().map(|s| s.s.clone()).collect()) + let max_idx = *groups.iter().map(|g| g.0).max().unwrap(); + let gstates = (0..=max_idx) + .map(|i| groups[&i].speakers.iter().map(|s| s.s.clone()).collect()) .collect(); bb.push(sample_rate, buf.clone(), gstates); }