1
0
Fork 0
mirror of https://github.com/librespot-org/librespot.git synced 2025-10-03 01:39:28 +02:00
Commit graph

2110 commits

Author SHA1 Message Date
Roderick van Domburg
d073cb1997
ci: update test.sh to sync clippy and check commands 2025-08-24 17:14:51 +02:00
Roderick van Domburg
b870db2b16
chore: update changelog template and Keep a Changelog link 2025-08-24 17:14:38 +02:00
Roderick van Domburg
e024ae65f0
feat: include examples directory in package 2025-08-24 17:07:30 +02:00
Roderick van Domburg
dd8005183d
fix: add version 0.7.0 to workspace dependencies 2025-08-24 17:03:45 +02:00
Roderick van Domburg
b8f7283807
refactor: remove remoteWait function and related call from publish.sh
"cargo publish" uses its own timeout now.
2025-08-24 17:03:30 +02:00
Roderick van Domburg
09dae0477f
chore: update changelog for 0.7.0 release date and comparison link 2025-08-24 16:55:12 +02:00
Roderick van Domburg
d53458a237
chore: bump version to 0.7.0 and update internal dependencies 2025-08-24 16:49:07 +02:00
Roderick van Domburg
ef3dca6cfb
chore: update crates 2025-08-24 16:19:12 +02:00
Roderick van Domburg
ba4562c3c0
fix: update version only if version.workspace is not set 2025-08-24 16:17:37 +02:00
Felix Prillwitz
9d0e39f9c3
fix: fires the connect and disconnect again (#1548) 2025-08-24 12:27:53 +02:00
Roderick van Domburg
78ce118d32
fix: rustls-tls features to support certificate stores (#1542)
Add separate features for native system roots and Mozilla webpki roots.
Update documentation and build configs to reflect new options.
2025-08-20 11:31:13 +02:00
Roderick van Domburg
0a4969ffe2
feat: add configurable TLS backend selection with native-tls as default (#1541)
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.
2025-08-19 23:06:28 +02:00
waveplate
03bcdc6bda
OAuth: Allow non-loopback addresses (#1514) 2025-08-16 14:21:41 +02:00
Roderick van Domburg
9456a02afa
perf(playback): optimize audio normalization for stereo processing (#1485)
- 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.
2025-08-14 12:00:48 +02:00
Roderick van Domburg
19f635f90b
perf: inline functions in the audio hot path 2025-08-14 00:53:59 +02:00
Roderick van Domburg
9f37808851
docs: document move from native tls to ring and webpki 2025-08-14 00:34:18 +02:00
Roderick van Domburg
f59766af7e
perf(playback): optimize audio conversion with 16-bit dithering and bit shifts
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.
2025-08-14 00:31:59 +02:00
Roderick van Domburg
218eced556
style: format with style edition 2024 2025-08-13 23:09:59 +02:00
Roderick van Domburg
056d125cb2
refactor: move from native to webpki certs on all platforms 2025-08-13 19:05:52 +02:00
Roderick van Domburg
416bf00888
feat: improve Gaussian dither 2025-08-13 18:40:00 +02:00
Roderick van Domburg
fe7ca0d700
refactor: move from aws-lc to ring 2025-08-13 18:34:40 +02:00
Roderick van Domburg
c4766ceb99
fix: downgrade sysinfo for MSRV constraints 2025-08-13 17:22:37 +02:00
Roderick van Domburg
445f8b10a2
refactor: clean up Rodio fallback handling 2025-08-13 17:11:43 +02:00
Roderick van Domburg
648c9e30ea
ci: bump MSRV to 1.85 and update actions 2025-08-13 17:06:14 +02:00
Roderick van Domburg
1dcd041070
fix: install default crypto provider 2025-08-13 16:44:22 +02:00
Roderick van Domburg
6288e7e03c
refactor: update to Rust 1.85 and edition 2024, use inline log args
- 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.
2025-08-13 16:19:39 +02:00
Roderick van Domburg
0aec38b07a
refactor: use Rust 2021 format strings for error and debug messages 2025-08-13 15:44:58 +02:00
Roderick van Domburg
fdd4a16fdc
feat: fallback to S16 format if unsupported in Rodio backend 2025-08-13 13:27:16 +02:00
Roderick van Domburg
ce1ab8ff3f
refactor: update dependencies and code for latest ecosystem changes
- 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
2025-08-13 13:19:48 +02:00
Roderick van Domburg
1d5c0d8451
docs: correct changelog entry for stream_from_cdn 2025-08-13 13:18:53 +02:00
Timon de Groot
ba3d501b08
spclient: Specify base url for metadata requests (#1528)
Fixes #1527
2025-08-11 13:31:36 +02:00
./lemon.sh
3a700f0020
fix: add fallback logic for CDN urls (#1524) 2025-08-08 16:32:20 +02:00
Felix Prillwitz
be37402421
Expose possible mixer opening errors (#1488)
* playback: handle errors when opening mixer

* chore: update CHANGELOG.md

* fix tests and typo
2025-07-14 17:39:33 +02:00
Felix Prillwitz
80c27ec476
fix: playback of uris by api request (#1509)
- pop page after usage
- become active when play is requested
2025-06-26 17:39:49 +02:00
Richard Peña B.
b2915ee2bf
fix(cdn_url): add support for verify query parameter (#1513)
- 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
2025-06-26 17:27:59 +02:00
Mads Marquart
2c425ebd06
Fix compiler error when objc2 is in dependency tree (#1503) 2025-06-09 12:34:54 +02:00
Felix Prillwitz
3686718ea2
Chore: fix clippy warnings for stable (1.87) and nightly (1.89) (#1504)
* chore: stable - fix clippy warnings

* chore: nightly - fix clippy warnings
2025-06-09 12:13:17 +02:00
Felix Prillwitz
8b729540f4
Re-Add ability to handle/play tracks (#1468)
* 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
2025-05-04 20:29:54 +02:00
Felix Prillwitz
e2c3ac3146
Mark unrelated parsing error as warning (#1491)
* mark known parsing error as warning

* add copilot suggestion

* adjust unknown enum handling for json
2025-05-03 23:39:07 +02:00
Thomas Schlage
d12e1b8549
Send playback position as player event (#1495)
* 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
2025-05-03 23:37:17 +02:00
Scott S. McCoy
6bdc0eb312
spirc: Configurable volume control steps (#1498)
* 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>
2025-05-01 23:19:47 +02:00
Felix Prillwitz
59381ccad3
Handle/Ignore unknown audio formats (#1467)
* ignore unknown enum values

* update CHANGELOG.md

* metadata: introduce own AudioFileFormat

* metadata: adjust handling for better readability
2025-04-13 06:37:12 +00:00
Roderick van Domburg
cb958a07f2
Saturate seek position to track duration (#1483)
The fix prevents seeking past the end of a track by capping the requested
seek position to the actual duration.
2025-04-06 20:37:19 +02:00
Rudi Heitbaum
5981b88ac5
Update Cargo.lock (#1480)
Fixes build with CMake 4.0.0
2025-03-31 15:24:03 +00:00
Felix Prillwitz
837b3e6d1a
Emit shuffle and repeat events again (#1469)
* emit shuffle and repeat events again

* connect: split context/track repeat handling
2025-03-22 20:17:46 +01:00
Christoph
11c3df8eb1
removes homething devicetype (#1471)
* 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
2025-03-03 15:06:48 +01:00
Felix Prillwitz
09b4aa41e5
Add rustdoc to connect crate (#1455)
* 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
2025-02-22 23:39:16 +01:00
Carlos Tocino
f497806fb1
OAuth process made by a struct, allowing customization options. (#1462)
* get refresh token. Optional auth url browser opening

* changelog

* access token accepts custom message

* docs updated

* CustomParams renamed

* OAuthToken can be cloned

* builder pattern on token management

* changelog

* docs and format issues

* split methods and finish documentation

* new example and minor adjustments

* typo

* remove unnecessary dependency

* requested changes

* Update oauth/src/lib.rs

Co-authored-by: Felix Prillwitz <photovoltex@mailbox.org>

* Update oauth/src/lib.rs

Co-authored-by: Felix Prillwitz <photovoltex@mailbox.org>

* Update CHANGELOG.md

Co-authored-by: Felix Prillwitz <photovoltex@mailbox.org>

* Update oauth/src/lib.rs

Co-authored-by: Felix Prillwitz <photovoltex@mailbox.org>

* Update oauth/src/lib.rs

Co-authored-by: Felix Prillwitz <photovoltex@mailbox.org>

* Update oauth/src/lib.rs

Co-authored-by: Nick Steel <nick@nsteel.co.uk>

* Update oauth/src/lib.rs

Co-authored-by: Nick Steel <nick@nsteel.co.uk>

* remove veil. Oauth flow fix

* debug trait instead of veil

* Update main.rs

Co-authored-by: Nick Steel <nick@nsteel.co.uk>

---------

Co-authored-by: Felix Prillwitz <photovoltex@mailbox.org>
Co-authored-by: Nick Steel <nick@nsteel.co.uk>
2025-02-18 16:39:31 +01:00
humaita-github
581c8d61ea
Replacing atomic_shim with portable-atomic, since atomic_shim worsk well for MIPS and MIPSEL, but has problem with some ARM flavours. (#1466) 2025-02-14 20:16:29 +01:00
Dariusz Olszewski
cf61ede6c6
Fix cross compilation for armv6hf (Raspberry Pi 1) (#1457)
* 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>
2025-02-03 22:50:47 +01:00