Set gain and pitch on generators before connecting them.
This commit is contained in:
parent
aa60e1d70f
commit
9b7fb16ee5
|
@ -271,6 +271,11 @@ fn add_generator(
|
||||||
let generator = syz::BufferGenerator::new(&context)
|
let generator = syz::BufferGenerator::new(&context)
|
||||||
.expect("Failed to create generator");
|
.expect("Failed to create generator");
|
||||||
generator.buffer().set(&**b).expect("Unable to set buffer");
|
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
|
handle
|
||||||
.add_generator(&generator)
|
.add_generator(&generator)
|
||||||
.expect("Unable to add generator");
|
.expect("Unable to add generator");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user