mirror of
https://github.com/RustAudio/rodio
synced 2025-03-04 06:57:16 +00:00
Make basic/beep example less ear-deadly
This commit is contained in:
parent
3a29a5390e
commit
560b232b9d
1 changed files with 4 additions and 1 deletions
|
@ -13,12 +13,15 @@ fn main() {
|
|||
thread::sleep(Duration::from_millis(1500));
|
||||
|
||||
let file = std::fs::File::open("examples/beep2.wav").unwrap();
|
||||
stream.play_once(BufReader::new(file)).unwrap().detach();
|
||||
let beep2 = stream.play_once(BufReader::new(file)).unwrap();
|
||||
beep2.set_volume(0.3);
|
||||
beep2.detach();
|
||||
println!("Started beep2");
|
||||
|
||||
thread::sleep(Duration::from_millis(1500));
|
||||
let file = std::fs::File::open("examples/beep3.ogg").unwrap();
|
||||
let beep3 = stream.play_once(file).unwrap();
|
||||
beep3.set_volume(0.2);
|
||||
println!("Started beep3");
|
||||
|
||||
thread::sleep(Duration::from_millis(1500));
|
||||
|
|
Loading…
Add table
Reference in a new issue