diff --git a/Cargo.lock b/Cargo.lock index 71b4544..4887dc1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -118,15 +118,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - [[package]] name = "arboard" version = "3.2.0" @@ -340,21 +331,6 @@ dependencies = [ "libc", ] -[[package]] -name = "chrono" -version = "0.4.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" -dependencies = [ - "iana-time-zone", - "js-sys", - "num-integer", - "num-traits", - "time 0.1.45", - "wasm-bindgen", - "winapi", -] - [[package]] name = "clang-sys" version = "1.4.0" @@ -423,16 +399,6 @@ dependencies = [ "objc", ] -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] - [[package]] name = "combine" version = "4.6.6" @@ -577,50 +543,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" -[[package]] -name = "cxx" -version = "1.0.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc831ee6a32dd495436e317595e639a587aa9907bef96fe6e6abc290ab6204e9" -dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", -] - -[[package]] -name = "cxx-build" -version = "1.0.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94331d54f1b1a8895cd81049f7eaaaef9d05a7dcb4d1fd08bf3ff0806246789d" -dependencies = [ - "cc", - "codespan-reporting", - "once_cell", - "proc-macro2", - "quote", - "scratch", - "syn", -] - -[[package]] -name = "cxxbridge-flags" -version = "1.0.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48dcd35ba14ca9b40d6e4b4b39961f23d835dbb8eed74565ded361d93e1feb8a" - -[[package]] -name = "cxxbridge-macro" -version = "1.0.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bbeb29798b407ccd82a3324ade1a7286e0d29851475990b612670f6f5124d2" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "darling" version = "0.13.4" @@ -1072,7 +994,7 @@ dependencies = [ "line-wrap", "quick-xml", "serde", - "time 0.3.17", + "time", ] [[package]] @@ -1093,7 +1015,7 @@ checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", ] [[package]] @@ -1297,30 +1219,6 @@ dependencies = [ "tokio-native-tls", ] -[[package]] -name = "iana-time-zone" -version = "0.1.53" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "winapi", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" -dependencies = [ - "cxx", - "cxx-build", -] - [[package]] name = "ident_case" version = "1.0.1" @@ -1495,15 +1393,6 @@ dependencies = [ "safemem", ] -[[package]] -name = "link-cplusplus" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" -dependencies = [ - "cc", -] - [[package]] name = "lock_api" version = "0.4.9" @@ -1620,19 +1509,10 @@ checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" dependencies = [ "libc", "log", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "windows-sys 0.42.0", ] -[[package]] -name = "mp3-duration" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "348bdc7300502f0801e5b57c448815713cd843b744ef9bda252a2698fdf90a0f" -dependencies = [ - "thiserror", -] - [[package]] name = "native-tls" version = "0.2.11" @@ -1796,16 +1676,6 @@ dependencies = [ "syn", ] -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.15" @@ -2040,6 +1910,13 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba" +[[package]] +name = "pd-playback" +version = "0.1.0" +dependencies = [ + "minimp3", +] + [[package]] name = "peeking_take_while" version = "0.1.2" @@ -2069,7 +1946,6 @@ name = "pipedash" version = "0.1.0" dependencies = [ "base64 0.21.0", - "chrono", "directories", "eframe", "flate2", @@ -2078,7 +1954,6 @@ dependencies = [ "itertools", "log", "md5", - "mp3-duration", "ordered-float", "reqwest", "rodio", @@ -2321,12 +2196,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" -[[package]] -name = "scratch" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" - [[package]] name = "sctk-adwaita" version = "0.4.3" @@ -2467,7 +2336,7 @@ checksum = "48dfff04aade74dd495b007c831cd6f4e0cee19c344dd9dc0884c0289b70a786" dependencies = [ "log", "termcolor", - "time 0.3.17", + "time", ] [[package]] @@ -2659,17 +2528,6 @@ dependencies = [ "syn", ] -[[package]] -name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - [[package]] name = "time" version = "0.3.17" @@ -2848,12 +2706,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-width" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" - [[package]] name = "url" version = "2.3.1" @@ -2910,12 +2762,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" diff --git a/Cargo.toml b/Cargo.toml index e6bf489..63229ff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,25 +1,6 @@ -[package] -name = "pipedash" -version = "0.1.0" -edition = "2021" +[workspace] -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -eframe = "0.20.1" -rodio = "0.16.0" -home = "0.5.4" -base64 = "0.21.0" -flate2 = "1.0.25" -gd_plist = {git = "https://github.com/Syudagye/gd-plist.git", version = "1.4.0"} -chrono = "0.4.23" -ordered-float = "3.4.0" -thiserror = "1.0.38" -reqwest = {version = "0.11.14", features = [ "blocking" ]} -urlencoding = "2.1.2" -md5 = "0.7.0" -itertools = "0.10.5" -directories = "4.0.1" -simplelog = "0.12.0" -log = "0.4.17" -mp3-duration = "0.1.10" +members = [ + "pipedash", + "pd-playback", +] diff --git a/pd-playback/Cargo.toml b/pd-playback/Cargo.toml new file mode 100644 index 0000000..42920ad --- /dev/null +++ b/pd-playback/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "pd-playback" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +minimp3 = "0.5" diff --git a/pd-playback/src/lib.rs b/pd-playback/src/lib.rs new file mode 100644 index 0000000..a8491b5 --- /dev/null +++ b/pd-playback/src/lib.rs @@ -0,0 +1,9 @@ +use minimp3::{Decoder, Frame} + +#[cfg(test)] +mod tests { + use super::*; + #[test] + fn test_runs() { + } +} diff --git a/pipedash/Cargo.toml b/pipedash/Cargo.toml new file mode 100644 index 0000000..b174d53 --- /dev/null +++ b/pipedash/Cargo.toml @@ -0,0 +1,23 @@ +[package] +name = "pipedash" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +eframe = "0.20.1" +rodio = "0.16.0" +home = "0.5.4" +base64 = "0.21.0" +flate2 = "1.0.25" +gd_plist = {git = "https://github.com/Syudagye/gd-plist.git", version = "1.4.0"} +ordered-float = "3.4.0" +thiserror = "1.0.38" +reqwest = {version = "0.11.14", features = [ "blocking" ]} +urlencoding = "2.1.2" +md5 = "0.7.0" +itertools = "0.10.5" +directories = "4.0.1" +simplelog = "0.12.0" +log = "0.4.17" diff --git a/src/gd.rs b/pipedash/src/gd.rs similarity index 100% rename from src/gd.rs rename to pipedash/src/gd.rs diff --git a/src/main.rs b/pipedash/src/main.rs similarity index 100% rename from src/main.rs rename to pipedash/src/main.rs diff --git a/src/music.rs b/pipedash/src/music.rs similarity index 99% rename from src/music.rs rename to pipedash/src/music.rs index b04fe95..ffb0724 100644 --- a/src/music.rs +++ b/pipedash/src/music.rs @@ -1,7 +1,6 @@ use std::time::Duration; use ordered_float::OrderedFloat as Float; use std::collections::{BTreeMap, BTreeSet}; -use rodio::{Source, Sample}; pub type BeatPosition = Float;