Add support for choosing between native-tls and rustls-tls backends
through feature flags, with native-tls as the default for maximum
platform compatibility.
Key changes:
- Add mutually exclusive native-tls and rustls-tls feature flags
- Use conditional compilation to select TLS implementation
- Configure rustls-tls with platform certificate verifier
- Refactor to workspace-based dependency management
- Update CI workflows with improved cross-compilation support
- Add comprehensive TLS backend documentation
The native-tls backend uses system TLS libraries (OpenSSL on Linux,
Secure Transport on macOS, SChannel on Windows) while rustls-tls
provides a pure Rust implementation with platform certificate stores.
- Add pre-computed knee factor to eliminate division in sample loop
- Replace if-else chain with match pattern for cleaner branching
- Use direct references to reduce repeated array indexing
- Maintain existing stereo imaging via channel coupling
Addresses review comments from #1485 and incorporates optimizations
inspired by Rodio's limiter implementation for improved performance
in the stereo case.
Since Spotify audio is always 16-bit depth, optimize the conversion pipeline:
- Always dither at 16-bit level regardless of output format
- Preserve fractional precision until final rounding for better requantization
- Replace floating-point multiplication with compile-time bit shifts
- Add comprehensive inlining to eliminate function call overhead
- Specialize 24-bit clamping to remove runtime branching
This maintains proper dithering of the original 16-bit quantization artifacts
while maximizing performance through bit-shift operations and eliminating
unnecessary runtime calculations.
- Update MSRV to 1.85 and Rust edition to 2024.
- Refactor all logging macros to use inline argument formatting.
- Fix import order in main.rs and examples.
- Add async environment variable setter to main.rs as safe facade.
- Update many dependencies to latest versions across all crates
- Switch from `once_cell::OnceCell` to `std::sync::OnceLock` where appropriate
- Update OAuth to use stateful `reqwest` for HTTP requests
- Fix Rodio backend to honor the requested sample format
- Updated `MaybeExpiringUrls` to handle `verify` query parameter.
- Extracted expiry timestamp from `verify` parameter if present.
- Adjusted test cases to include URLs with `verify` parameter.
- Updated assertions to account for the new URL format.
This change ensures compatibility with URLs containing the `verify`
query parameter, improving the flexibility of the CDN URL handling.
Solves #1512
* re-add support to play a set of tracks
* connect: reduce some cloning
* connect: derive clone for LoadRequest
* apply review, improve function naming
* clippy fix
* Send play progress as PlayerEvent::PositionChanged
* Replaced PlayerEvent::PositionChanged with set_progress_callback() method
* Revert "Replaced PlayerEvent::PositionChanged with set_progress_callback() method"
This reverts commit f26e3de07b.
* Added opt-in config in PlayerConfig for progress event
* Added doc comments and set default position interval to 1sec for standalone
* Remove handling of PositionChanged in standalone binary
* Fixed wrong event handling
* spirc: Configurable volume control steps
Allow the volume control steps to be configured via the `--volume-steps`
command line parameter. The author personally found the default volume
steps of `1024` to be completely unusable, and is presently using `128`
as his configuration. Perhaps consider this as a more reasonable
default.
Additionally, reduce the delay in volume update from a wopping two
seconds to 500ms, again for usability.
Also clean up the seemingly unnecessary use of a pattern match on
whether or not `--initial-volume` was supplied.
* fixup! spirc: Configurable volume control steps
* fixup! spirc: Configurable volume control steps
* fixup! spirc: Configurable volume control steps
* fixup! spirc: Configurable volume control steps
* fixup! spirc: Configurable volume control steps
* fixup! spirc: Configurable volume control steps
---------
Co-authored-by: Scott S. McCoy <scott.s.mccoy@acm.org>
* removes homething devicetype
fixes#1470
From the comments about "homething" support in spotify:
"Did they ever release their homething product? I assumed not and guess they removed all support for it. We could just remove this footgun."
* mention breaking homething change in Changelog
* restructure connect and add initial docs
* replace inline crate rustdoc with README.md
* connect: make metadata trait less visible
* connect: add some more docs
* chore: remove clippy warning
* update CHANGELOG.md
* revert unrelated changes
* enforce separation of autoplay and options
* hide and improve docs of uid
* remove/rename remarks
* update connect example and link in docs
* fixup rebase and clippy warnings
* Use ring instead of aws-lc as the default backend for hyper-rustls
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
* Cross-compile with libmdns
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
* Simplify Docker image to cross-compile for armv6hf (RPi 1)
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
* Revert "Use ring instead of aws-lc as the default backend for hyper-rustls"
This reverts commit faeaf506d6.
* Fix bindgen issues (aws-lc-rs) when cross-compiling for armv6hf
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
* Add git to the Docker image for cross-compiling
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
---------
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
Co-authored-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
* connect: add shuffle_vec.rs
* connect: shuffle in place
* add shuffle with seed option
* reduce complexity to add new metadata fields
* add context index to metadata
* use seed for shuffle
When losing the connection and restarting the dealer, the seed is now stored in the context metadata. So on transfer we can pickup the seed again and shuffle the context as it was previously
* add log for shuffle seed
* connect: use small_rng, derive Default
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update softmixer.rs
Use AtomicU64 from atomic_shim, so that librespot works with MIPS and MIPSEL
* Update Cargo.toml with atomic-shim dependency
Added atomic-shim dependency
* Update Cargo.lock with atomic-shim package
Added atomic-shim package