From eb261f29d0ae15c2f941c2d84972bd321bf764ac Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 28 Oct 2018 17:51:39 +0100 Subject: Test of playing an audio file Success! Using the 'rodio' crate to play an audio file. Include the audio file in the binary using `include_bytes!`. This makes it so we get a single self-contained binary. Struggled a bit with getting the reader/array to `Seek`, but finally figured out `Cursor` and got it working. Cool. --- src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 20f4fb6..f685dfe 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -19,6 +19,7 @@ extern crate magic_crypt; #[macro_use] extern crate quick_error; +extern crate rodio; #[macro_use] extern crate serde_derive; @@ -36,6 +37,7 @@ mod ffi; mod key_code; mod map; mod parser; +mod sounds; mod trial; use parser::{Action, HeadphoneButton, MapAction, MapGroup, MapKind}; -- cgit v1.2.3