From 9b7fb16ee525700f975a450d54a12e17cd879482 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Sun, 4 Sep 2022 12:01:32 -0500 Subject: [PATCH] Set gain and pitch on generators before connecting them. --- src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 79982bc..a541682 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -271,6 +271,11 @@ fn add_generator( let generator = syz::BufferGenerator::new(&context) .expect("Failed to create generator"); generator.buffer().set(&**b).expect("Unable to set buffer"); + generator.gain().set(sound.gain).expect("Failed to set gain"); + generator + .pitch_bend() + .set(sound.pitch) + .expect("Failed to set pitch"); handle .add_generator(&generator) .expect("Unable to add generator");