diff options
| author | Raymond Hogenson <rhogenson@posteo.net> | 2018-08-24 18:09:36 -0400 |
|---|---|---|
| committer | Raymond Hogenson <rhogenson@posteo.net> | 2018-08-24 18:09:36 -0400 |
| commit | d98c24f00ffe08a067040b7efaa934c2efc1bfac (patch) | |
| tree | 586324ba26110ae49dc0356dd4a7af6151ca9d3b /src/music.rs | |
| parent | Make taking injuries more flexible (diff) | |
| download | stallman-shooter-d98c24f00ffe08a067040b7efaa934c2efc1bfac.tar.zst | |
Load the images directly into the executable
Cool, haha. We did it.
I also changed a bunch of random shit.
Diffstat (limited to 'src/music.rs')
| -rw-r--r-- | src/music.rs | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/music.rs b/src/music.rs deleted file mode 100644 index 0009479..0000000 --- a/src/music.rs +++ /dev/null @@ -1,32 +0,0 @@ -extern crate std; - -pub struct Player { - player: Option<std::process::Child>, -} - -impl Player { - pub fn play(&mut self) -> Result<(), &'static str> { - match std::process::Command::new("mpv").arg("https://www.youtube.com/watch?v=3bNITQR4Uso").arg("--no-video").stdin(std::process::Stdio::null()).spawn() { - Ok(child) => { - self.player = Some(child); - Ok(()) - } - Err(_) => Err("Couldn't use mpv to play music") - } - } -} - -impl Drop for Player { - fn drop(&mut self) { - match self.player { - Some(ref mut x) => { - let _ = x.kill(); - } - None => { } - } - } -} - -pub fn new() -> Player { - Player { player: None } -} |
