Commit graph

1846 commits

Author SHA1 Message Date
Roderick van Domburg 8ad5a78bf6
Add repository URL 2022-05-21 22:51:30 +02:00
Roderick van Domburg dff19377fa
Update version numbers to 0.4.0 2022-05-21 22:31:15 +02:00
Roderick van Domburg 310b3cca81
Prepare for 0.4.0 release 2022-05-21 22:14:18 +02:00
Roderick van Domburg 2e8d145bc9
Merge pull request #1004 from roderickvd/update-crates
Update crates
2022-05-21 22:07:48 +02:00
Roderick van Domburg b08502c801
Update crates 2022-05-21 21:51:37 +02:00
Roderick van Domburg 3e80eebf7a
Merge pull request #1003 from roderickvd/fix-clippy-lints
Fix clippy lints
2022-05-21 21:48:51 +02:00
Roderick van Domburg 2a3e248bba
Fix clippy lints 2022-05-21 21:36:56 +02:00
Roderick van Domburg 89347cdcef
Merge pull request #1002 from roderickvd/fix-arm-ci
Fix CI on ARM
2022-05-21 21:27:13 +02:00
Roderick van Domburg cf25c2aa36
Fix CI on ARM 2022-05-21 21:06:29 +02:00
Sean McNamara 3d298768b3
Backport #964 GStreamer backend cleanup (#979) 2022-05-21 20:55:55 +02:00
Louis Seubert 6c2491b9a3
adding callback for reusable credentials (#983)
This allows more control over how the credentials are saved to the cache
2022-05-20 12:53:44 +02:00
Roderick van Domburg 1efda79787
Merge pull request #995 from bmwiedemann/dev
Allow to override build_id with SOURCE_DATE_EPOCH
2022-05-20 11:39:34 +02:00
Roderick van Domburg be9a393b2a
Merge pull request #997 from WhyNotHugo/avoid-unwrap-disco
Avoid crash when Avahi is not available
2022-05-20 11:19:36 +02:00
Roderick van Domburg 6097d5313e
Merge pull request #998 from WhyNotHugo/bump-msrv
Bump MSRV to 1.53
2022-05-20 11:09:26 +02:00
Bernhard M. Wiedemann 9de1f38e92 Allow to override build_id with SOURCE_DATE_EPOCH
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.

This PR was done while working on reproducible builds for openSUSE.
2022-05-20 10:29:42 +02:00
Hugo Osvaldo Barrera 4fd7ac24ce Bump MSRV to 1.53
See: https://github.com/librespot-org/librespot/pull/997
2022-05-20 08:57:21 +02:00
Hugo Osvaldo Barrera c4af90f5fe Avoid crashing when Avahi is not available
When librespot is built with Avahi turned on, it will crash if Avahi is
later not available at runtime.

This change avoids it crashing hard when Avahi is not available;
librespot will merely warn of the issue.

This affects some distribution packages too, where the maintainer might
prefer leaving Avahi support enabled, but many setups don't (or can't)
run Avahi.

Co-authored-by: Nick Steel <nick@nsteel.co.uk>
2022-05-20 08:39:20 +02:00
Jason Gray 7efc62b9ca
Remove the volume sample iteration (#986)
Move volume calculations out of their own separate samples iteration and into the normalisation iteration
2022-05-19 22:23:14 +02:00
Roderick van Domburg 70de5752dc
Merge pull request #1000 from Gnarflord/dev
Bump libmdns to 0.7
2022-05-19 22:03:48 +02:00
Gnarflord 10c9a0f8ea
Use libmdns 0.7 to avoid packet 47 error 2022-05-19 18:37:21 +02:00
Roderick van Domburg e2233ba005
Merge pull request #988 from JasonLG1979/update-stuff
Update dependencies
2022-04-22 08:59:39 +02:00
JasonLG1979 3be6990a13 Update dependencies 2022-04-19 17:29:37 -05:00
Roderick van Domburg a7a260be16
Fix SDL deprecations 2022-04-07 23:20:49 +02:00
Roderick van Domburg 0c05aa2eff
Update crates 2022-04-07 22:51:08 +02:00
Roderick van Domburg 1290ee9925
Fix clippy warnings 2022-04-07 22:32:43 +02:00
Roderick van Domburg 6a98a0138c
Merge pull request #981 from JasonLG1979/port-976
Port PulseAudio enhancements
2022-04-07 21:24:33 +02:00
JasonLG1979 d887d58251 Fix clippy warnings 2022-03-20 10:52:08 -05:00
JasonLG1979 dc9f822c80 Port #976 2022-03-19 21:15:46 -05:00
Roderick van Domburg 650d41b020
Merge pull request #976 from JasonLG1979/pulseaudio-name
Set the PulseAudio name to match librespot's device name
2022-03-19 22:49:26 +01:00
JasonLG1979 e0e23c9167 Use the librespot name arg for the app name in the PulseAudio backend
This sets the name displayed by PulseAudio to Librespot - Instance Name if a name is given otherwise Librespot (the default name).

This also sets the correct "role" as per the docs:

https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/Clients/ApplicationProperties/

PA_PROP_MEDIA_ROLE

"This is a property of the actual streamed data, not so much the application"

Roles are used for policies, things like automatically muting a music player when a call comes in and whatnot.

For bonus points this also sets PULSE_PROP_application.icon_name to audio-x-generic so that we get a nice icon in the PulseAudio settings by our name instead of a missing icon placeholder.
2022-03-19 15:09:26 -05:00
Roderick van Domburg dd8155b044
Merge pull request #967 from JasonLG1979/SymphoniaDecoder
Refactor Symphonia decoder
2022-03-04 11:58:17 +01:00
Roderick van Domburg dfa48562c4
Merge pull request #968 from JasonLG1979/silence-compiler-warning
Silence compiler warning
2022-03-04 11:56:32 +01:00
JasonLG1979 30c960a6cd Silence compiler warning
The `split` variable in `split_uri` should not be `mut`.
2022-02-23 17:08:43 -06:00
JasonLG1979 85d6c0c714 symphonia_decoder tweak
* Remove unwrap

* Refactor normalisation_data.
2022-02-20 01:27:12 -06:00
Jason Gray 47f1362453
Port remove unsafe code and catch up with dev (#956) 2022-02-14 12:15:19 +01:00
Jason Gray 616809b64c
Quantum-realm level normalisation optimization (#965)
This saves up to 1-2% CPU useage on a PI 4 depending on how much normalisation is actually being done.

* We don't need to test against EPSILON. The factor will never be over 1.0 in basic normalisation mode.
* Don't check the normalisation mode EVERY sample.
* Do as little math as possible by simplfiying all equations as much as possible (while still retaining the textbook equations in comments).
* Misc cleanup
2022-02-13 22:50:32 +01:00
Sebastian Dröge ab562cc8d8
Update GStreamer to 0.18 and clean up (#964)
* Update GStreamer backend to 0.18
* Don't manually go through all intermediate states when shutting down the GStreamer backend; that happens automatically
* Don't initialize GStreamer twice
* Use less stringly-typed API for configuring the appsrc
* Create our own main context instead of stealing the default one; if the application somewhere else uses the default main context this would otherwise fail in interesting ways
* Create GStreamer pipeline more explicitly instead of going via strings for everything
* Add an audioresample element before the sink in case the sink doesn't support the sample rate
* Remove unnecessary `as_bytes()` call
* Use a GStreamer bus sync handler instead of spawning a new thread with a mainloop; it's only used for printing errors or when the end of the stream is reached, which can also be done as well when synchronously handling messages.
* Change `expect()` calls to proper error returns wherever possible in GStreamer backend
* Store asynchronously reported error in GStreamer backend and return them on next write
* Update MSRV to 1.56
2022-02-13 21:52:02 +01:00
Roderick van Domburg cb194cfd3b
Merge pull request #966 from michaelherger/fix-params-printout
Only log runtime argument if it starts with a dash "-"
2022-02-13 20:48:36 +01:00
Michael Herger 6f6d330bce Only log runtime argument if it starts with a dash "-"
When there's a value that corresponds to an argument name used in the same command line, the logging of the arguments gets confused and logs the matching argument, but without the leading dash:

```
% target/debug/librespot -n c --verbose -c /path/to/my/cache
[2022-02-07T22:32:25Z INFO  librespot] librespot 0.3.1 55ced49 (Built on 2022-02-07, Build ID: qaEB8kEW, Profile: debug)
[2022-02-07T22:32:25Z TRACE librespot] Command line argument(s):
[2022-02-07T22:32:25Z TRACE librespot] 		-n "c"
[2022-02-07T22:32:25Z TRACE librespot] 		c "/path/to/my/cache"
[2022-02-07T22:32:25Z TRACE librespot] 		--verbose
[2022-02-07T22:32:25Z TRACE librespot] 		-c "/path/to/my/cache"
```

Here we're using the literal `c` as the device name, and the `-c` argument. Thus the `c /path/to/my/cache` is logged in addition to `-c /path...`.

After checking whether the key has a leading dash, this issue is gone:

```
% target/debug/librespot -n c --verbose -c /path/to/my/cache
[2022-02-07T22:32:41Z INFO  librespot] librespot 0.3.1 55ced49 (Built on 2022-02-07, Build ID: qaEB8kEW, Profile: debug)
[2022-02-07T22:32:41Z TRACE librespot] Command line argument(s):
[2022-02-07T22:32:41Z TRACE librespot] 		-n "c"
[2022-02-07T22:32:41Z TRACE librespot] 		--verbose
[2022-02-07T22:32:41Z TRACE librespot] 		-c "/path/to/my/cache"
```
2022-02-07 23:37:29 +01:00
Roderick van Domburg c49415c3fb
Merge pull request #960 from JasonLG1979/fix-shuffle
Prevent shuffle crash
2022-02-03 09:36:09 +01:00
Roderick van Domburg 009814679e
Merge pull request #962 from pdeljanov/symphonia-v0.5
Upgrade to Symphonia v0.5
2022-02-03 09:34:35 +01:00
Philip Deljanov e64f09fd77 Upgrade to Symphonia v0.5. 2022-02-01 19:02:14 -05:00
JasonLG1979 d54f3982a0 update changelog 2022-02-01 17:48:13 -06:00
JasonLG1979 edb98d5c1d Prevent shuffle crash
fixes https://github.com/librespot-org/librespot/issues/959
2022-01-31 18:31:09 -06:00
Roderick van Domburg f4be9bb85d
Merge pull request #954 from JasonLG1979/remove-dep-warning
Remove basic normalisation deprecation warning
2022-01-28 08:45:18 +01:00
JasonLG1979 3c749a8f0e Remove basic normalisation deprecation warning 2022-01-27 17:03:21 -06:00
Roderick van Domburg c8971dce63
Fix Alsa softvol linear mapping (#950)
Use `--volume-range` overrides
2022-01-27 18:39:28 +01:00
Jason Gray 03e71f6e0a
simplify get_factor (#942)
Simplify `get_factor`
2022-01-27 07:40:59 +01:00
Roderick van Domburg 9b25669a08
Fix clippy lints 2022-01-26 23:05:40 +01:00
Roderick van Domburg 827b815da9
Update Rodio and neatly call play/pause 2022-01-26 22:54:04 +01:00