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

2119 commits

Author SHA1 Message Date
Jay Malhotra
0e5531ff54
docs: Document examples (#1567)
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.
2025-09-09 19:05:04 +00:00
Will Stott
f16a30e86a
chore: update libmdns to 0.10.1 (#1575) 2025-09-07 14:39:10 +02:00
Roderick van Domburg
987dfa5df2
chore: prepare for v0.7.1 release 2025-08-31 21:05:20 +02:00
Roderick van Domburg
dcd90083fe
chore: update crates 2025-08-31 20:59:19 +02:00
Felix Prillwitz
eff5ca3294
Adjust: Allow repeat in combination with shuffle (#1561)
* fix: incorrect autoplay resolver behavior when shuffling

* refactor: store the initial track in the remote context

* adjust: shuffle repeat interaction

* chore: update .gitignore

* chore: rename internal error

* adjust: shuffle behavior to ensure consistency

* fix: prefer repeat context over autoplay

* chore: update changelog

* chore: reduce complexity of shuffle

* chore: test shuffle with first
2025-08-31 20:32:01 +02:00
Felix Prillwitz
882ed7cf4f
Fix: Use config defaults instead of type defaults (#1556)
* fix: use the config instead of the type default

* chore: update changelog

* fix: repair build for pulseaudio-backend
2025-08-29 23:51:40 +02:00
Felix Prillwitz
c715885747
Fix: Delete the connect state only on spirc shutdown (#1555)
* fix: only delete the state on shutdown

* chore: update changelog
2025-08-27 11:18:02 +02:00
Felix Prillwitz
b6931e3de5
Fix: Fixup how the headers are set in spclient to prevent deleting headers (#1552) 2025-08-26 23:53:12 +01:00
Thang Pham
1a19d94063
disable logging on rodio stream drop (#1557) 2025-08-26 23:51:23 +01:00
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