- refine dependency features and versions in Cargo.toml files
- switch from parking_lot to std sync primitives
- remove dashmap dependency and use DefaultKeyedStateStore
- update crates
Replace parking_lot with std::sync::{Mutex, RwLock, Condvar} throughout the
codebase. Update dependencies and code to use poisoning-aware locks, adding
explicit panic messages where necessary. Update governor to use DashMapStateStore
for rate limiting.
* refactor: Introduce SpotifyUri struct
Contributes to #1266
Introduces a new `SpotifyUri` struct which is layered on top of the
existing `SpotifyId`, but has the capability to support URIs that do
not confirm to the canonical base62 encoded format. This allows it to
describe URIs like `spotify:local`, `spotify:genre` and others that
`SpotifyId` cannot represent.
Changed the internal player state to use these URIs as much as possible,
such that the player could in the future accept a URI of the type
`spotify:local`, as a means of laying the groundwork for local file
support.
* fix: Don't pass unknown URIs from deprecated player methods
* refactor: remove SpotifyUri::to_base16
This should be deprecated for the same reason to_base62 is, and could unpredictably throw errors -- consumers should match on the inner ID if they need a base62 representation and handle failure appropriately
* refactor: Store original data in SpotifyUri::Unknown
Instead of assuming Unknown has a u128 SpotifyId, store the original data and type that we failed to parse.
* refactor: Remove SpotifyItemType
* refactor: Address review feedback
* test: Add more SpotifyUri tests
* chore: Correctly mark changes as breaking in CHANGELOG.md
* refactor: Respond to review feedback
* chore: Changelog updates
Document the process for running the examples. This was fairly
non-obvious and I spent a fair bit of time trying and failing to get
a client credentials token to work before finding in some discussion
that this is known not to work.
The wiki mentions using the oauth example as a way to get a token
and I think that is likely to be the best way to get a token for the
purposes of running the examples too.
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