Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
test: drain sparse mixer samples with trailing input
Richie McIlroy89169ff3e029
diff --git a/crates/recording/src/sources/audio_mixer.rs b/crates/recording/src/sources/audio_mixer.rsindex e5ad1f79e..cbf7ea4a2 100644--- a/crates/recording/src/sources/audio_mixer.rs+++ b/crates/recording/src/sources/audio_mixer.rs@@ -1116,12 +1116,21 @@ mod test {probe.send(0, 300, 960, Some(0));probe.send(0, 600, 960, Some(0));probe.send(0, 900, 4_800, Some(0));- probe.tick(1_000);- assert_eq!(probe.peaks(0), [14_400, 28_800, 43_200]);+ probe.send(0, 1_000, 4_800, None);+ probe.send(1, 1_000, 4_800, None);+ probe.tick(1_100);+ assert_eq!(+ probe.peaks(0),+ [14_400, 28_800, 43_200],+ "{} output samples",+ probe.pcm.len()+ );assert_eq!(probe.peaks(1), [14_400]);probe.send(0, 1_500, 4_800, Some(0));probe.send(1, 1_500, 4_800, Some(0));- probe.tick(1_600);+ probe.send(0, 1_600, 4_800, None);+ probe.send(1, 1_600, 4_800, None);+ probe.tick(1_700);assert_eq!(probe.peaks(0), [14_400, 28_800, 43_200, 72_000]);assert_eq!(probe.peaks(1), [14_400, 72_000]);}