mirror of
https://github.com/encounter/rust-sdl2.git
synced 2026-07-10 21:18:41 -07:00
Fix audio whitenoise example
This commit is contained in:
@@ -16,7 +16,7 @@ impl AudioCallback for MyCallback {
|
||||
|
||||
// Generate white noise
|
||||
for x in out.iter_mut() {
|
||||
*x = (rng.next_f32()*2.0 - 1.0) * self.volume;
|
||||
*x = (rng.gen_range(0.0, 2.0) - 1.0) * self.volume;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user