From 44879aac02710db5327c9b4bb57a214b01514a76 Mon Sep 17 00:00:00 2001 From: Jeron Aldaron Lau Date: Sun, 28 Aug 2022 13:52:56 -0500 Subject: [PATCH] Update links and Cargo.toml --- .rustfmt.toml | 10 ++++- CHANGELOG.md | 1 + CODE_OF_CONDUCT.md | 76 ------------------------------------- CONTRIBUTING.md | 22 ----------- Cargo.toml | 8 ++-- README.md | 14 +++---- src/ffi/dummy/ffi.rs | 3 +- src/ffi/linux/ffi.rs | 3 +- src/ffi/linux/microphone.rs | 4 +- src/ffi/linux/pcm.rs | 9 +++-- src/ffi/linux/speakers.rs | 4 +- src/ffi/macos/ffi.rs | 3 +- src/ffi/mod.rs | 2 +- src/ffi/wasm/ffi.rs | 3 +- src/lib.rs | 4 +- 15 files changed, 38 insertions(+), 128 deletions(-) delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md diff --git a/.rustfmt.toml b/.rustfmt.toml index 2e4d27f..3e82467 100644 --- a/.rustfmt.toml +++ b/.rustfmt.toml @@ -1,2 +1,10 @@ +# Don't deviate too much, just reduce columns and stricter enforcement +edition = "2021" +unstable_features = true max_width = 80 -use_field_init_shorthand = true +reorder_impl_items = true +group_imports = "StdExternalCrate" +imports_granularity = "Crate" +newline_style = "Unix" +normalize_doc_attributes = true +wrap_comments = true diff --git a/CHANGELOG.md b/CHANGELOG.md index ec9228e..bec5d9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://jeronlau.tk/semver/). ### Changed - Update to pasts 0.12.0 - Replace `supports()` with `config()` + - Bumped to 2021 edition ### Removed - `Speakers::play()` - use `Notifier` impl on `Speakers` instead diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index b19a756..0000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,76 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, sex characteristics, gender identity and expression, -level of experience, education, socio-economic status, nationality, personal -appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or - advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at aldaronlau@gmail.com. All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html - -[homepage]: https://www.contributor-covenant.org - -For answers to common questions about this code of conduct, see -https://www.contributor-covenant.org/faq diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 1502084..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,22 +0,0 @@ -# Contributing -Anyone is welcome to contribute! You can [open an issue], -[Post to GitHub Discussions] or [send me an email] about anything related to -this project. You may also [open a PR]. I don't require PRs to be formatted in -a specific manner, since I'll run it through rustfmt after the merge anyway. If -you're going to work on a PR, it would be preferred to let me know ahead of time -(unless it's a quick fix), and open a draft PR if it's a large one. Then I'll -assign the issue to you. Otherwise, I can't guarantee I won't duplicate your -work. If I can't contact you within a week, I may unassign you and finish your -work (opening a Draft PR on this repository puts your code under this crate's -license). - -If you open a bug report, you can usually expect it to be fixed within a week. -If you open a feature request it may stay open indefinitely, until I need it -too. I mark feature requests as "enhancements" on GitHub issues. - -Happy coding! - -[open an issue]: https://github.com/libcala/wavy/issues -[send me an email]: mailto:aldaronlau@gmail.com -[open a PR]: https://github.com/libcala/wavy/pulls -[Post to GitHub Discussions]: https://github.com/libcala/wavy/discussions diff --git a/Cargo.toml b/Cargo.toml index 5c72341..5b47c0f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,22 +9,22 @@ [package] name = "wavy" -version = "0.9.1" +version = "0.10.0" license = "Apache-2.0 OR BSL-1.0 OR MIT" description = """ Asynchronous cross-platform real-time audio recording & playback. """ -repository = "https://github.com/libcala/wavy" +repository = "https://github.com/ardaku/wavy" documentation = "https://docs.rs/wavy" -homepage = "https://github.com/libcala/wavy/blob/main/CHANGELOG.md" +homepage = "https://github.com/ardaku/wavy/blob/stable/CHANGELOG.md" include = ["Cargo.toml", "src/*"] categories = [ "game-engines", "hardware-support", "multimedia", "multimedia::audio", "os" ] keywords = ["audio", "realtime", "cross-platform", "record", "play"] readme = "README.md" -edition = "2018" +edition = "2021" # For all platforms [dependencies.fon] diff --git a/README.md b/README.md index 6b4f7fe..142141a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ #### [Changelog][3] | [Source][4] | [Getting Started][5] -[![tests](https://github.com/libcala/wavy/workflows/tests/badge.svg)][2] +[![tests](https://github.com/ardaku/wavy/workflows/tests/badge.svg)][2] [![docs](https://docs.rs/wavy/badge.svg)][0] [![crates.io](https://img.shields.io/crates/v/wavy.svg)][1] @@ -45,15 +45,15 @@ email at [aldaronlau@gmail.com][13]. [0]: https://docs.rs/wavy [1]: https://crates.io/crates/wavy -[2]: https://github.com/libcala/wavy/actions?query=workflow%3Atests -[3]: https://github.com/libcala/wavy/blob/main/CHANGELOG.md -[4]: https://github.com/libcala/wavy/ +[2]: https://github.com/ardaku/wavy/actions?query=workflow%3Atests +[3]: https://github.com/ardaku/wavy/blob/stable/CHANGELOG.md +[4]: https://github.com/ardaku/wavy/ [5]: https://docs.rs/wavy#getting-started [6]: https://aldaronlau.com/ -[7]: https://github.com/libcala/wavy/blob/main/LICENSE_APACHE_2_0.txt +[7]: https://github.com/ardaku/wavy/blob/stable/LICENSE_APACHE_2_0.txt [8]: https://www.apache.org/licenses/LICENSE-2.0 -[9]: https://github.com/libcala/wavy/blob/main/LICENSE_MIT.txt +[9]: https://github.com/ardaku/wavy/blob/stable/LICENSE_MIT.txt [10]: https://mit-license.org/ -[11]: https://github.com/libcala/wavy/blob/main/LICENSE_BOOST_1_0.txt +[11]: https://github.com/ardaku/wavy/blob/stable/LICENSE_BOOST_1_0.txt [12]: https://www.boost.org/LICENSE_1_0.txt [13]: mailto:aldaronlau@gmail.com diff --git a/src/ffi/dummy/ffi.rs b/src/ffi/dummy/ffi.rs index a1da201..52fe395 100644 --- a/src/ffi/dummy/ffi.rs +++ b/src/ffi/dummy/ffi.rs @@ -11,8 +11,7 @@ mod device_list; mod microphone; mod speakers; -use device_list::SoundDevice; - pub(crate) use device_list::device_list; +use device_list::SoundDevice; pub(super) use microphone::{Microphone, MicrophoneStream}; pub(super) use speakers::{Speakers, SpeakersSink}; diff --git a/src/ffi/linux/ffi.rs b/src/ffi/linux/ffi.rs index ded3127..c726d40 100644 --- a/src/ffi/linux/ffi.rs +++ b/src/ffi/linux/ffi.rs @@ -12,11 +12,10 @@ mod microphone; mod speakers; // Implementation Expectations: +pub(crate) use asound::device_list::device_list; use asound::{ device_list::{open, pcm_hw_params, AudioDevice, SoundDevice, DEFAULT}, PollFd, SndPcmAccess, SndPcmFormat, SndPcmMode, SndPcmState, SndPcmStream, }; - -pub(crate) use asound::device_list::device_list; pub(crate) use microphone::{Microphone, MicrophoneStream}; pub(crate) use speakers::{Speakers, SpeakersSink}; diff --git a/src/ffi/linux/microphone.rs b/src/ffi/linux/microphone.rs index 45ee8f5..ec60e60 100644 --- a/src/ffi/linux/microphone.rs +++ b/src/ffi/linux/microphone.rs @@ -220,7 +220,7 @@ impl Future for Microphone { -77 => { eprintln!( "Incorrect state (-EBADFD): Report Bug to \ - https://github.com/libcala/wavy/issues/new" + https://github.com/ardaku/wavy/issues/new" ); unreachable!() } @@ -236,7 +236,7 @@ impl Future for Microphone { st => { eprintln!( "Incorrect state = {:?} (XRUN): Report Bug \ - to https://github.com/libcala/wavy/issues/new", + to https://github.com/ardaku/wavy/issues/new", st ); unreachable!() diff --git a/src/ffi/linux/pcm.rs b/src/ffi/linux/pcm.rs index 1838b96..e7dfd97 100644 --- a/src/ffi/linux/pcm.rs +++ b/src/ffi/linux/pcm.rs @@ -15,10 +15,13 @@ use std::{ os::raw::{c_char, c_int, c_uint, c_void}, }; -use super::super::{ - PollFd, SndPcmAccess, SndPcmFormat, SndPcmMode, SndPcmState, SndPcmStream, +use super::{ + super::{ + PollFd, SndPcmAccess, SndPcmFormat, SndPcmMode, SndPcmState, + SndPcmStream, + }, + ALSA, }; -use super::ALSA; pub(crate) unsafe fn hw_params_set_period_size_near( pcm: *mut c_void, diff --git a/src/ffi/linux/speakers.rs b/src/ffi/linux/speakers.rs index 4453d71..2ab1103 100644 --- a/src/ffi/linux/speakers.rs +++ b/src/ffi/linux/speakers.rs @@ -256,7 +256,7 @@ impl Future for Speakers { st => { eprintln!( "Incorrect state = {:?} (XRUN): Report Bug to \ - https://github.com/libcala/wavy/issues/new", + https://github.com/ardaku/wavy/issues/new", st ); unreachable!() @@ -266,7 +266,7 @@ impl Future for Speakers { -77 => { eprintln!( "Incorrect state (-EBADFD): Report Bug to \ - https://github.com/libcala/wavy/issues/new" + https://github.com/ardaku/wavy/issues/new" ); unreachable!() } diff --git a/src/ffi/macos/ffi.rs b/src/ffi/macos/ffi.rs index a1da201..52fe395 100644 --- a/src/ffi/macos/ffi.rs +++ b/src/ffi/macos/ffi.rs @@ -11,8 +11,7 @@ mod device_list; mod microphone; mod speakers; -use device_list::SoundDevice; - pub(crate) use device_list::device_list; +use device_list::SoundDevice; pub(super) use microphone::{Microphone, MicrophoneStream}; pub(super) use speakers::{Speakers, SpeakersSink}; diff --git a/src/ffi/mod.rs b/src/ffi/mod.rs index 768d293..a032ae3 100644 --- a/src/ffi/mod.rs +++ b/src/ffi/mod.rs @@ -9,5 +9,5 @@ compile_error!( "Target os not supported, please open an issue at \ - https://github.com/libcala/wavy/issues" + https://github.com/ardaku/wavy/issues" ); diff --git a/src/ffi/wasm/ffi.rs b/src/ffi/wasm/ffi.rs index 96a03ff..04f9fb8 100644 --- a/src/ffi/wasm/ffi.rs +++ b/src/ffi/wasm/ffi.rs @@ -145,8 +145,7 @@ mod device_list; mod microphone; mod speakers; -use device_list::SoundDevice; - pub(crate) use device_list::device_list; +use device_list::SoundDevice; pub(super) use microphone::{Microphone, MicrophoneStream}; pub(super) use speakers::{Speakers, SpeakersSink}; diff --git a/src/lib.rs b/src/lib.rs index 0d92e71..3f9df37 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -70,8 +70,8 @@ //! ``` #![doc( - html_logo_url = "https://libcala.github.io/logo.svg", - html_favicon_url = "https://libcala.github.io/icon.svg", + html_logo_url = "https://ardaku.github.io/mm/logo.svg", + html_favicon_url = "https://ardaku.github.io/mm/icon.svg", html_root_url = "https://docs.rs/wavy" )] #![deny(unsafe_code)]