diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 127484f..8bc2068 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -24,9 +24,3 @@ jobs: run: cargo test --all-features --verbose - name: Rustfmt run: cargo fmt --all -- --check - - name: Install cargo-cranky - uses: baptiste0928/cargo-install@v1 - with: - crate: cargo-cranky - - name: Cranky - run: cargo cranky --all-targets --all-features -- -D warnings diff --git a/Cargo.toml b/Cargo.toml index 8d115da..c282f4a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "kittyaudio" description = "An audio playback library focusing on simplicity" -license = "MIT OR BSL-1.0" -version = "0.1.9" +license = "Unlicense OR MIT OR BSL-1.0" +version = "0.2.0" exclude = ["assets/**"] documentation = "https://docs.rs/kittyaudio" homepage = "https://github.com/zeozeozeo/kittyaudio" @@ -15,11 +15,11 @@ readme = "README.md" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -cpal = { version = "0.15.2", optional = true } -parking_lot = "0.12.1" -serde = { version = "1.0.193", features = ["derive"], optional = true } -symphonia = { version = "0.5.3", features = ["all"], optional = true } -thiserror = "2.0.0" +cpal = { version = "0.15.3", optional = true } +parking_lot = "0.12.3" +serde = { version = "1", features = ["derive"], optional = true } +symphonia = { version = "0.5.4", features = ["all"], optional = true } +thiserror = "2.0.11" [features] default = ["symphonia", "cpal"] diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..fdddb29 --- /dev/null +++ b/LICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/examples/record_mixer.rs b/examples/record_mixer.rs index 5ed5e88..151ee4f 100644 --- a/examples/record_mixer.rs +++ b/examples/record_mixer.rs @@ -7,7 +7,7 @@ use std::time::Instant; fn main() { println!("loading sound..."); let sound = include_sound!("../assets/drozerix_-_crush.ogg").unwrap(); - let mut mixer = RecordMixer::new(); + let mixer = RecordMixer::new(); mixer.play(sound); diff --git a/examples/simple.rs b/examples/simple.rs index 7abe214..d7f39fe 100644 --- a/examples/simple.rs +++ b/examples/simple.rs @@ -23,15 +23,3 @@ fn main() { // wait for all sounds to finish (use mixer.is_finished() to check for that) mixer.wait(); } - -// same thing but without comments. -#[cfg(not)] -fn main() { - let sound = include_sound!("drozerix_-_crush.ogg").unwrap(); - - let mut mixer = Mixer::new(); - mixer.init(); - - mixer.play(sound); - mixer.wait(); -} diff --git a/src/backend.rs b/src/backend.rs index b1d0262..b1250d6 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -68,11 +68,10 @@ impl Device { self, host: cpal::Host, ) -> Result { - Ok(self + Ok(*self .cpal_device(host)? .default_output_config()? - .buffer_size() - .clone()) + .buffer_size()) } /// Return the [cpal] device name.