From 66d0aae79270a1bf02ce209f6f7d90919be2763a Mon Sep 17 00:00:00 2001 From: Corbin Crutchley Date: Sun, 26 Oct 2025 11:23:54 -0700 Subject: [PATCH] chore: upgrade rdio --- src-tauri/Cargo.lock | 380 +++++++++++++++-------------------------- src-tauri/Cargo.toml | 2 +- src-tauri/src/lib.rs | 13 +- src-tauri/src/state.rs | 11 +- 4 files changed, 157 insertions(+), 249 deletions(-) diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 9354be3..7994345 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -503,24 +503,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bindgen" -version = "0.70.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" -dependencies = [ - "bitflags 2.6.0", - "cexpr", - "clang-sys", - "itertools 0.13.0", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.94", -] - [[package]] name = "bitflags" version = "1.3.2" @@ -760,8 +742,6 @@ version = "1.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a012a0df96dd6d06ba9a1b29d6402d1a5d77c6befd2566afdc26e10603dc93d7" dependencies = [ - "jobserver", - "libc", "shlex", ] @@ -771,15 +751,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - [[package]] name = "cfb" version = "0.7.3" @@ -826,17 +797,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "clang-sys" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" -dependencies = [ - "glob", - "libc", - "libloading 0.8.6", -] - [[package]] name = "clap" version = "4.5.23" @@ -877,12 +837,6 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" -[[package]] -name = "claxon" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bfbf56724aa9eca8afa4fcfadeb479e722935bb2a0900c2d37e0cc477af0688" - [[package]] name = "cocoa" version = "0.25.0" @@ -1066,41 +1020,38 @@ dependencies = [ [[package]] name = "coreaudio-rs" -version = "0.11.3" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "321077172d79c662f64f5071a03120748d5bb652f5231570141be24cfcd2bace" +checksum = "1aae284fbaf7d27aa0e292f7677dfbe26503b0d555026f702940805a630eac17" dependencies = [ "bitflags 1.3.2", - "core-foundation-sys", - "coreaudio-sys", -] - -[[package]] -name = "coreaudio-sys" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ce857aa0b77d77287acc1ac3e37a05a8c95a2af3647d23b15f263bdaeb7562b" -dependencies = [ - "bindgen", + "libc", + "objc2-audio-toolbox", + "objc2-core-audio", + "objc2-core-audio-types", + "objc2-core-foundation", ] [[package]] name = "cpal" -version = "0.15.3" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "873dab07c8f743075e57f524c583985fbaf745602acbe916a01539364369a779" +checksum = "cbd307f43cc2a697e2d1f8bc7a1d824b5269e052209e28883e5bc04d095aaa3f" dependencies = [ "alsa", - "core-foundation-sys", "coreaudio-rs", "dasp_sample", "jni", "js-sys", "libc", "mach2", - "ndk 0.8.0", + "ndk", "ndk-context", - "oboe", + "num-derive", + "num-traits", + "objc2-audio-toolbox", + "objc2-core-audio", + "objc2-core-audio-types", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -2299,12 +2250,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "hound" -version = "3.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62adaabb884c94955b19907d60019f4e145d091c75345379e70d1ee696f7854f" - [[package]] name = "html5ever" version = "0.29.1" @@ -2676,15 +2621,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" -dependencies = [ - "either", -] - [[package]] name = "itoa" version = "1.0.14" @@ -2736,15 +2672,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" -[[package]] -name = "jobserver" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" -dependencies = [ - "libc", -] - [[package]] name = "js-sys" version = "0.3.76" @@ -2818,17 +2745,6 @@ dependencies = [ "spin", ] -[[package]] -name = "lewton" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "777b48df9aaab155475a83a7df3070395ea1ac6902f5cd062b8f2b028075c030" -dependencies = [ - "byteorder", - "ogg", - "tinyvec", -] - [[package]] name = "libappindicator" version = "0.9.0" @@ -3161,20 +3077,6 @@ dependencies = [ "windows-sys 0.60.2", ] -[[package]] -name = "ndk" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" -dependencies = [ - "bitflags 2.6.0", - "jni-sys", - "log", - "ndk-sys 0.5.0+25.2.9519653", - "num_enum", - "thiserror 1.0.69", -] - [[package]] name = "ndk" version = "0.9.0" @@ -3184,7 +3086,7 @@ dependencies = [ "bitflags 2.6.0", "jni-sys", "log", - "ndk-sys 0.6.0+11769913", + "ndk-sys", "num_enum", "raw-window-handle", "thiserror 1.0.69", @@ -3196,15 +3098,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" -[[package]] -name = "ndk-sys" -version = "0.5.0+25.2.9519653" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" -dependencies = [ - "jni-sys", -] - [[package]] name = "ndk-sys" version = "0.6.0+11769913" @@ -3334,6 +3227,17 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", +] + [[package]] name = "num-traits" version = "0.2.19" @@ -3437,6 +3341,21 @@ dependencies = [ "objc2-quartz-core 0.3.2", ] +[[package]] +name = "objc2-audio-toolbox" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6948501a91121d6399b79abaa33a8aa4ea7857fe019f341b8c23ad6e81b79b08" +dependencies = [ + "bitflags 2.6.0", + "libc", + "objc2 0.6.3", + "objc2-core-audio", + "objc2-core-audio-types", + "objc2-core-foundation", + "objc2-foundation 0.3.2", +] + [[package]] name = "objc2-av-foundation" version = "0.3.2" @@ -3459,6 +3378,28 @@ dependencies = [ "objc2-foundation 0.3.2", ] +[[package]] +name = "objc2-core-audio" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1eebcea8b0dbff5f7c8504f3107c68fc061a3eb44932051c8cf8a68d969c3b2" +dependencies = [ + "dispatch2", + "objc2 0.6.3", + "objc2-core-audio-types", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-core-audio-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a89f2ec274a0cf4a32642b2991e8b351a404d290da87bb6a9a9d8632490bd1c" +dependencies = [ + "bitflags 2.6.0", + "objc2 0.6.3", +] + [[package]] name = "objc2-core-data" version = "0.2.2" @@ -3705,38 +3646,6 @@ dependencies = [ "objc2-security", ] -[[package]] -name = "oboe" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8b61bebd49e5d43f5f8cc7ee2891c16e0f41ec7954d36bcb6c14c5e0de867fb" -dependencies = [ - "jni", - "ndk 0.8.0", - "ndk-context", - "num-derive", - "num-traits", - "oboe-sys", -] - -[[package]] -name = "oboe-sys" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8bb09a4a2b1d668170cfe0a7d5bc103f8999fb316c98099b6a9939c9f2e79d" -dependencies = [ - "cc", -] - -[[package]] -name = "ogg" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6951b4e8bf21c8193da321bcce9c9dd2e13c858fe078bf9054a288b419ae5d6e" -dependencies = [ - "byteorder", -] - [[package]] name = "once_cell" version = "1.20.2" @@ -3818,7 +3727,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39b0deead1528fd0e5947a8546a9642a9777c25f6e1e26f34c97b204bbb465bd" dependencies = [ "heck 0.4.1", - "itertools 0.12.1", + "itertools", "proc-macro2", "proc-macro2-diagnostics", "quote", @@ -4607,14 +4516,13 @@ dependencies = [ [[package]] name = "rodio" -version = "0.20.1" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ceb6607dd738c99bc8cb28eff249b7cd5c8ec88b9db96c0608c1480d140fb1" +checksum = "e40ecf59e742e03336be6a3d53755e789fd05a059fa22dfa0ed624722319e183" dependencies = [ - "claxon", "cpal", - "hound", - "lewton", + "dasp_sample", + "num-rational", "symphonia 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4664,12 +4572,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - [[package]] name = "rustc_version" version = "0.4.1" @@ -5655,13 +5557,13 @@ dependencies = [ "symphonia-bundle-flac 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "symphonia-bundle-mp3 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "symphonia-codec-aac 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "symphonia-codec-adpcm 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "symphonia-codec-pcm 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "symphonia-codec-vorbis 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "symphonia-core 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "symphonia-core 0.5.5", "symphonia-format-isomp4 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "symphonia-format-ogg 0.5.5", "symphonia-format-riff 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "symphonia-metadata 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "symphonia-metadata 0.5.5", ] [[package]] @@ -5673,17 +5575,17 @@ dependencies = [ "symphonia-bundle-flac 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", "symphonia-bundle-mp3 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", "symphonia-codec-aac 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", - "symphonia-codec-adpcm 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", + "symphonia-codec-adpcm", "symphonia-codec-alac", "symphonia-codec-pcm 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", "symphonia-codec-vorbis 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", - "symphonia-core 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", + "symphonia-core 0.5.4", "symphonia-format-caf", "symphonia-format-isomp4 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", "symphonia-format-mkv", - "symphonia-format-ogg", + "symphonia-format-ogg 0.5.4", "symphonia-format-riff 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", - "symphonia-metadata 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", + "symphonia-metadata 0.5.4", ] [[package]] @@ -5693,8 +5595,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72e34f34298a7308d4397a6c7fbf5b84c5d491231ce3dd379707ba673ab3bd97" dependencies = [ "log", - "symphonia-core 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "symphonia-metadata 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "symphonia-core 0.5.5", + "symphonia-metadata 0.5.5", "symphonia-utils-xiph", ] @@ -5705,8 +5607,8 @@ source = "git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6#6c5dc5b7 dependencies = [ "log", "symphonia-common", - "symphonia-core 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", - "symphonia-metadata 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", + "symphonia-core 0.5.4", + "symphonia-metadata 0.5.4", ] [[package]] @@ -5717,8 +5619,8 @@ checksum = "c01c2aae70f0f1fb096b6f0ff112a930b1fb3626178fba3ae68b09dce71706d4" dependencies = [ "lazy_static", "log", - "symphonia-core 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "symphonia-metadata 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "symphonia-core 0.5.5", + "symphonia-metadata 0.5.5", ] [[package]] @@ -5728,7 +5630,7 @@ source = "git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6#6c5dc5b7 dependencies = [ "lazy_static", "log", - "symphonia-core 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", + "symphonia-core 0.5.4", ] [[package]] @@ -5739,7 +5641,7 @@ checksum = "cdbf25b545ad0d3ee3e891ea643ad115aff4ca92f6aec472086b957a58522f70" dependencies = [ "lazy_static", "log", - "symphonia-core 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "symphonia-core 0.5.5", ] [[package]] @@ -5749,17 +5651,7 @@ source = "git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6#6c5dc5b7 dependencies = [ "lazy_static", "log", - "symphonia-core 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", -] - -[[package]] -name = "symphonia-codec-adpcm" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c94e1feac3327cd616e973d5be69ad36b3945f16b06f19c6773fc3ac0b426a0f" -dependencies = [ - "log", - "symphonia-core 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "symphonia-core 0.5.4", ] [[package]] @@ -5768,7 +5660,7 @@ version = "0.5.4" source = "git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6#6c5dc5b7b878ef53a577222823be777fc2ff7430" dependencies = [ "log", - "symphonia-core 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", + "symphonia-core 0.5.4", ] [[package]] @@ -5777,7 +5669,7 @@ version = "0.5.4" source = "git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6#6c5dc5b7b878ef53a577222823be777fc2ff7430" dependencies = [ "log", - "symphonia-core 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", + "symphonia-core 0.5.4", ] [[package]] @@ -5787,7 +5679,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f395a67057c2ebc5e84d7bb1be71cce1a7ba99f64e0f0f0e303a03f79116f89b" dependencies = [ "log", - "symphonia-core 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "symphonia-core 0.5.5", ] [[package]] @@ -5796,7 +5688,7 @@ version = "0.5.4" source = "git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6#6c5dc5b7b878ef53a577222823be777fc2ff7430" dependencies = [ "log", - "symphonia-core 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", + "symphonia-core 0.5.4", ] [[package]] @@ -5806,7 +5698,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a98765fb46a0a6732b007f7e2870c2129b6f78d87db7987e6533c8f164a9f30" dependencies = [ "log", - "symphonia-core 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "symphonia-core 0.5.5", "symphonia-utils-xiph", ] @@ -5817,7 +5709,7 @@ source = "git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6#6c5dc5b7 dependencies = [ "log", "symphonia-common", - "symphonia-core 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", + "symphonia-core 0.5.4", ] [[package]] @@ -5825,34 +5717,34 @@ name = "symphonia-common" version = "0.5.4" source = "git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6#6c5dc5b7b878ef53a577222823be777fc2ff7430" dependencies = [ - "symphonia-core 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", - "symphonia-metadata 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", + "symphonia-core 0.5.4", + "symphonia-metadata 0.5.4", ] [[package]] name = "symphonia-core" version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "798306779e3dc7d5231bd5691f5a813496dc79d3f56bf82e25789f2094e022c3" +source = "git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6#6c5dc5b7b878ef53a577222823be777fc2ff7430" dependencies = [ - "arrayvec", - "bitflags 1.3.2", + "bitflags 2.6.0", "bytemuck", "lazy_static", "log", + "num-complex", + "smallvec", ] [[package]] name = "symphonia-core" -version = "0.5.4" -source = "git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6#6c5dc5b7b878ef53a577222823be777fc2ff7430" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea00cc4f79b7f6bb7ff87eddc065a1066f3a43fe1875979056672c9ef948c2af" dependencies = [ - "bitflags 2.6.0", + "arrayvec", + "bitflags 1.3.2", "bytemuck", "lazy_static", "log", - "num-complex", - "smallvec", ] [[package]] @@ -5861,7 +5753,7 @@ version = "0.5.4" source = "git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6#6c5dc5b7b878ef53a577222823be777fc2ff7430" dependencies = [ "log", - "symphonia-core 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", + "symphonia-core 0.5.4", ] [[package]] @@ -5872,8 +5764,8 @@ checksum = "abfdf178d697e50ce1e5d9b982ba1b94c47218e03ec35022d9f0e071a16dc844" dependencies = [ "encoding_rs", "log", - "symphonia-core 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "symphonia-metadata 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "symphonia-core 0.5.5", + "symphonia-metadata 0.5.5", "symphonia-utils-xiph", ] @@ -5884,8 +5776,8 @@ source = "git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6#6c5dc5b7 dependencies = [ "log", "symphonia-common", - "symphonia-core 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", - "symphonia-metadata 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", + "symphonia-core 0.5.4", + "symphonia-metadata 0.5.4", ] [[package]] @@ -5896,7 +5788,7 @@ dependencies = [ "lazy_static", "log", "symphonia-common", - "symphonia-core 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", + "symphonia-core 0.5.4", ] [[package]] @@ -5906,8 +5798,20 @@ source = "git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6#6c5dc5b7 dependencies = [ "log", "symphonia-common", - "symphonia-core 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", - "symphonia-metadata 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", + "symphonia-core 0.5.4", + "symphonia-metadata 0.5.4", +] + +[[package]] +name = "symphonia-format-ogg" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b4955c67c1ed3aa8ae8428d04ca8397fbef6a19b2b051e73b5da8b1435639cb" +dependencies = [ + "log", + "symphonia-core 0.5.5", + "symphonia-metadata 0.5.5", + "symphonia-utils-xiph", ] [[package]] @@ -5918,8 +5822,8 @@ checksum = "05f7be232f962f937f4b7115cbe62c330929345434c834359425e043bfd15f50" dependencies = [ "extended", "log", - "symphonia-core 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "symphonia-metadata 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "symphonia-core 0.5.5", + "symphonia-metadata 0.5.5", ] [[package]] @@ -5929,42 +5833,42 @@ source = "git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6#6c5dc5b7 dependencies = [ "extended", "log", - "symphonia-core 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", - "symphonia-metadata 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", + "symphonia-core 0.5.4", + "symphonia-metadata 0.5.4", ] [[package]] name = "symphonia-metadata" version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc622b9841a10089c5b18e99eb904f4341615d5aa55bbf4eedde1be721a4023c" +source = "git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6#6c5dc5b7b878ef53a577222823be777fc2ff7430" dependencies = [ - "encoding_rs", "lazy_static", "log", - "symphonia-core 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-lite", + "smallvec", + "symphonia-core 0.5.4", ] [[package]] name = "symphonia-metadata" -version = "0.5.4" -source = "git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6#6c5dc5b7b878ef53a577222823be777fc2ff7430" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36306ff42b9ffe6e5afc99d49e121e0bd62fe79b9db7b9681d48e29fa19e6b16" dependencies = [ + "encoding_rs", "lazy_static", "log", - "regex-lite", - "smallvec", - "symphonia-core 0.5.4 (git+https://github.com/pdeljanov/Symphonia.git?branch=dev-0.6)", + "symphonia-core 0.5.5", ] [[package]] name = "symphonia-utils-xiph" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "484472580fa49991afda5f6550ece662237b00c6f562c7d9638d1b086ed010fe" +checksum = "ee27c85ab799a338446b68eec77abf42e1a6f1bb490656e121c6e27bfbab9f16" dependencies = [ - "symphonia-core 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "symphonia-metadata 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "symphonia-core 0.5.5", + "symphonia-metadata 0.5.5", ] [[package]] @@ -6052,9 +5956,9 @@ dependencies = [ "lazy_static", "libc", "log", - "ndk 0.9.0", + "ndk", "ndk-context", - "ndk-sys 0.6.0+11769913", + "ndk-sys", "objc2 0.6.3", "objc2-app-kit 0.3.2", "objc2-foundation 0.3.2", @@ -7951,7 +7855,7 @@ dependencies = [ "jni", "kuchikiki", "libc", - "ndk 0.9.0", + "ndk", "objc2 0.6.3", "objc2-app-kit 0.3.2", "objc2-core-foundation", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index d361b0b..6810db3 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -28,7 +28,7 @@ serde = { version = "1.0.228", features = ["derive"] } serde_json = "1.0.145" symphonia = { git = "https://github.com/pdeljanov/Symphonia.git", branch = "dev-0.6", features = ["all"] } tauri-plugin-dialog = "2.4.0" -rodio = {version = "0.20.1", features = ["symphonia-all"] } +rodio = "0.21.1" window-vibrancy = "0.6.0" tauri-plugin-window-state = "2.4.0" tauri-plugin-decorum = "1.1.1" diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 633f8ed..61263c4 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -6,7 +6,7 @@ mod music; mod state; use migration::{Migrator, MigratorTrait}; -use rodio::OutputStream; +use rodio::OutputStreamBuilder; use sea_orm::Database; use state::AppDataNew; use tauri::{Manager, State, Theme}; @@ -32,7 +32,12 @@ pub async fn run() { .expect("Database connection failed"); Migrator::up(&db, None).await.unwrap(); - let (_stream, stream_handle) = OutputStream::try_default().unwrap(); + // Create the output stream and leak it to keep it alive for the program lifetime + // This is necessary because OutputStream on macOS is not Send + let stream = OutputStreamBuilder::open_default_stream().unwrap(); + let mixer: &'static _ = Box::leak(Box::new(stream.mixer().clone())); + // Leak the stream to keep it alive - it will be cleaned up on program exit + Box::leak(Box::new(stream)); tauri::Builder::default() .plugin(tauri_plugin_os::init()) @@ -40,8 +45,8 @@ pub async fn run() { .plugin(tauri_plugin_opener::init()) .plugin(tauri_plugin_window_state::Builder::default().build()) .plugin(tauri_plugin_decorum::init()) - .setup(|app| { - let state = state::AppData::new(AppDataNew { db, stream_handle }); + .setup(move |app| { + let state = state::AppData::new(AppDataNew { db, mixer }); app.manage(state.clone()); if cfg!(target_os = "macos") { diff --git a/src-tauri/src/state.rs b/src-tauri/src/state.rs index a631ebd..3fb47fe 100644 --- a/src-tauri/src/state.rs +++ b/src-tauri/src/state.rs @@ -1,4 +1,5 @@ -use rodio::{OutputStreamHandle, Sink}; +use rodio::mixer::Mixer; +use rodio::Sink; use sea_orm::DatabaseConnection; use std::sync::{Arc, Mutex}; @@ -10,20 +11,19 @@ pub struct AppMetadata { #[derive(Clone)] pub struct AppData { pub metadata: Arc>, - pub stream_handle: OutputStreamHandle, pub sink: Arc, pub db: DatabaseConnection, } pub struct AppDataNew { pub db: DatabaseConnection, - pub stream_handle: OutputStreamHandle, + pub mixer: &'static Mixer, } impl AppData { pub fn new(args: AppDataNew) -> Self { - let AppDataNew { db, stream_handle } = args; - let sink: Sink = Sink::try_new(&stream_handle).unwrap(); + let AppDataNew { db, mixer } = args; + let sink: Sink = Sink::connect_new(mixer); Self { db, @@ -32,7 +32,6 @@ impl AppData { currently_playing_file_path: None, })), sink: Arc::new(sink), - stream_handle, } } } -- 2.51.2