diff --git a/Cargo.toml b/Cargo.toml index cac8b7d..95981a2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ categories = ["date-and-time"] [features] default = ["desktop", "sound"] desktop = ["dep:notify-rust"] -sound = ["dep:rodio", "desktop"] +sound = ["desktop"] [dependencies] @@ -25,5 +25,4 @@ humantime = "2.1.0" libpt = { version = "0.6.0", features = ["cli"] } notify-rust = { version = "4.11.0", optional = true } ratatui = "0.27.0" -rodio = { version = "0.19.0", optional = true } tui-big-text = "0.4.5" diff --git a/src/clock.rs b/src/clock.rs index 194c30b..88f1798 100644 --- a/src/clock.rs +++ b/src/clock.rs @@ -408,16 +408,11 @@ impl Clock { #[cfg(feature = "sound")] { trace!("playing bundled sound"); - use rodio::{source::Source, Decoder, OutputStream}; - // only 30 KiB, so let's just include it in the binary and not worry about reading it // from the fs and somehow making the file be there let sound: Cursor<_> = std::io::Cursor::new(include_bytes!("../data/media/alarm.mp3")); - // Get an output stream handle to the default physical sound device - let (_stream, stream_handle) = OutputStream::try_default().unwrap(); - let source = Decoder::new(sound).expect("could not load the included sound"); - stream_handle.play_raw(source.convert_samples())?; // the sound plays in another thread + // TODO: add something to make a sound debug!("played bundled sound"); } #[cfg(feature = "desktop")]