Commit graph

61 commits

Author SHA1 Message Date
Roderick van Domburg
e9f3b6d290
Catch-up changelog 2022-07-31 00:04:08 +02:00
Roderick van Domburg
786f8832d1
Update version numbers to 0.5.0-dev 2022-07-30 22:28:12 +02:00
Roderick van Domburg
38bebc242a
Prepare for 0.4.2 release 2022-07-29 21:34:01 +02:00
Roderick van Domburg
87ea69b457
Blacklist ap-gue1.spotify.com access point 2022-07-29 21:30:27 +02:00
Roderick van Domburg
7bd9186e94
Blacklist ap-gew4 access point (#1026) 2022-07-28 18:51:49 +02:00
JasonLG1979
582fdebadd Update Changelog
This should update the changelog for my last 3 PR's.
2022-07-20 20:27:45 -05:00
JasonLG1979
e4deb5ddcd Fix fixed volume with hardware mixer.
fixes https://github.com/librespot-org/librespot/issues/1008
2022-06-09 16:34:42 -05:00
Roderick van Domburg
fc1e74574a
Update changelog 2022-05-23 22:21:56 +02:00
JasonLG1979
79b92bbe7a Update changelog and such 2022-05-23 13:42:38 -05:00
Roderick van Domburg
5568c70cd1
Prepare for new developments 2022-05-21 22:52:39 +02:00
Roderick van Domburg
310b3cca81
Prepare for 0.4.0 release 2022-05-21 22:14:18 +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
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
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
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
JasonLG1979
d54f3982a0 update changelog 2022-02-01 17:48:13 -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
Jason Gray
ceebb374f0
Remove unsafe code (#940)
Remove unsafe code
2022-01-23 19:02:04 +01:00
Roderick van Domburg
72af0d2014
New dynamic limiter for very wide dynamic ranges (#935)
New dynamic limiter for very wide dynamic ranges
2022-01-14 23:31:29 +01:00
Roderick van Domburg
1e54913523
Fix --device argument to various backends (#938)
Fix `--device` argument to various backends
2022-01-14 08:20:29 +01:00
Guillaume Desmottes
f09be4850e Sink: pass ownership of the packet on write()
Prevent a copy if the implementation needs to keep the data around.
2021-12-31 13:46:35 +01:00
JasonLG1979
305f80bdfd Fix auto fallback for --alsa-mixer-device and --alsa-mixer-index
As mentioned in https://github.com/librespot-org/librespot/issues/898#issuecomment-986528998
2021-12-21 19:29:35 -06:00
Jason Gray
e66cc5508c
parse environment variables (#886)
Make librespot able to parse environment variables for options and flags.

To avoid name collisions environment variables must be prepended with `LIBRESPOT_` so option/flag `foo-bar` becomes `LIBRESPOT_FOO_BAR`.

Verbose logging mode (`-v`, `--verbose`) logs all parsed environment variables and command line arguments (credentials are redacted).
2021-12-01 21:29:58 +01:00
Tom Vincent
bbd575ed23
Harden systemd service, update restart policy (#888) 2021-11-26 19:49:50 +01:00
JasonLG1979
c006a23644 Improve --device ? functionality for the alsa backend
This makes `--device ?` only show compatible devices (ones that support 2 ch 44.1 Interleaved) and it shows what `librespot` format(s) they support.

This should be more useful to users as the info maps directly to `librespot`'s `--device` and `--format` options.
2021-11-20 13:51:24 -06:00
JasonLG1979
0e9fdbe6b4 Refactor main.rs
* Don't panic when parsing options. Instead list valid values and exit.
* Get rid of needless .expect in playback/src/audio_backend/mod.rs.
* Enforce reasonable ranges for option values (breaking).
* Don't evaluate options that would otherwise have no effect.
* Add pub const MIXERS to mixer/mod.rs very similar to the audio_backend's implementation. (non-breaking though)
* Use different option descriptions and error messages based on what backends are enabled at build time.
* Add a -q, --quiet option that changed the logging level to warn.
* Add a short name for every flag and option.
* Note removed options.
* Other misc cleanups.
2021-11-17 15:31:16 -06:00
JasonLG1979
24e4d2b636 Prevent librespot from becoming a zombie
Prevent hang when discovery is disabled and there are no credentials or when bad credentials are given.
2021-10-28 09:13:46 -05:00
JasonLG1979
9152ca8159 Update changelog 2021-10-26 22:20:24 -05:00
Roderick van Domburg
9d19841c0f
Prepare for 0.3.1 release 2021-10-24 20:07:11 +02:00
Roderick van Domburg
4c89a721ee
Improve dithering CPU usage (#866) 2021-10-19 22:33:04 +02:00
Nick Steel
3b51a5dc23 Include build profile in the displayed version information
Example output from -V for a debug build is:
librespot 0.3.0 832889b (Built on 2021-10-14, Build ID: ANJrycbG, Profile: debug)
2021-10-14 14:38:09 +01:00
Roderick van Domburg
d99581aeb7
Tag 0.3.0 and document #859 2021-10-13 20:37:46 +02:00
Roderick van Domburg
289b4f9bcc
Fix behavior after last track of an album/playlist
* When autoplay is disabled, then loop back to the first track
   instead of 10 tracks back. Continue or stop playing depending
   on the state of the repeat button.

 * When autoplay is enabled, then extend the playlist *after* the
   last track. #844 broke this such that the last track of an album
   or playlist was never played.

Fixes: #434
2021-10-05 22:08:26 +02:00
Roderick van Domburg
095536f100
Prepare for 0.3.0 release 2021-10-04 21:44:03 +02:00
Jason Gray
89577d1fc1
Improve player (#823)
* Improve error handling
* Harmonize `Seek`: Make the decoders and player use the same math for converting between samples and milliseconds
* Reduce duplicate calls: Make decoder seek in PCM, not ms
* Simplify decoder errors with `thiserror`
2021-09-20 19:29:12 +02:00
Roderick van Domburg
949ca4fded
Add and default to "auto" normalisation type (#844) 2021-09-20 19:22:02 +02:00
Matias
7401d6a96e
Don't panic on local files (#846)
Skip tracks whose Spotify ID can't be found
2021-09-20 19:20:44 +02:00
Roderick van Domburg
fe644bc0d7
Update default normalisation threshold 2021-09-02 22:04:30 +02:00
Roderick van Domburg
c67e268dc8
Improve Alsa mixer command-line options 2021-08-26 22:35:45 +02:00
Jason Gray
9ff33980d6
Better errors in PulseAudio backend (#801)
* More meaningful error messages
* Use F32 if a user requests F64 (F64 is not supported by PulseAudio)
* Move all code that can fail to `start` where errors can be returned to prevent panics
* Use drain in `stop`
2021-06-30 21:14:23 +02:00
Reinier Balt
751ccf63bb
Make convert and decoder public (#814) 2021-06-30 09:54:02 +02:00
JasonLG1979
586e864427 Update change log 2021-06-18 17:33:49 -05:00
Jason Gray
4c77854ffe
Better errors alsa backend (#797)
Better error handling in Alsa backend

* More consistent error messages
* Bail on fatal errors in player
* Capture and log the original error as a warning when trying to write to PCM before trying to recover
2021-06-18 20:25:09 +02:00
Roderick van Domburg
c30959212a
Update CHANGELOG.md 2021-06-09 20:50:24 +02:00
JasonLG1979
4af095e741 Improve ALSA buffer size
* Go back to 4 periods at 125ms.
* Deal strictly in period time and periods to set ALSA buffer.
* Rename `buffer` to `period_buffer`.
* Add comments and change some other var names to add clarity.
* Let ALSA calculate the size of `period_buffer`.
2021-06-08 23:44:20 -05:00
Roderick van Domburg
ad19b69bfb
Various code improvements (#777)
* Remove deprecated use of std::u16::MAX
* Use `FromStr` for fallible `&str` conversions
* DRY up strings into constants
* Change `as_ref().map()` into `as_deref()`
* Use `Duration` for time constants and functions
* Optimize `Vec` with response times
* Move comments for `rustdoc` to parse
2021-05-31 22:32:39 +02:00
Roderick van Domburg
bae1834988
Fix output on big-endian systems (#778) 2021-05-30 20:57:46 +02:00