|
@@ -7,28 +7,11 @@ extern crate rodio;
|
|
|
mod base;
|
|
|
use base::*;
|
|
|
|
|
|
-fn play(location: &PathBuf) {
|
|
|
- let dev = rodio::default_output_device().unwrap();
|
|
|
-
|
|
|
- let file = std::fs::File::open(&location).unwrap();
|
|
|
- let sink = rodio::play_once(&dev, BufReader::new(file)).unwrap();
|
|
|
- // let source = rodio::Decoder::new(BufReader::new(file)).unwrap();
|
|
|
- // rodio::play_raw(&dev, source);
|
|
|
-
|
|
|
- thread::sleep(Duration::from_millis(1500));
|
|
|
-
|
|
|
-}
|
|
|
|
|
|
fn main() {
|
|
|
- // let device = rodio::default_output_device().unwrap();
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
|
|
|
let dev = rodio::default_output_device().unwrap();
|
|
|
|
|
|
-
|
|
|
-
|
|
|
let hat = Sound{location: PathBuf::from("media/c64sid-ch1.wav")};
|
|
|
let snare = Sound{location: PathBuf::from("media/c64sid-snare12.wav")};
|
|
|
let kick = Sound{location: PathBuf::from("media/c64sid-kick5.wav")};
|
|
@@ -49,6 +32,4 @@ fn main() {
|
|
|
bar.play(&dev);
|
|
|
|
|
|
|
|
|
- //thread::sleep(Duration::from_millis(1500));
|
|
|
-
|
|
|
}
|