Commit graph

403 commits

Author SHA1 Message Date
Sasha Hilton
8973d29837
Merge pull request #684 from roderickvd/fix-onevent-panic
Log error instead of panicking when child fails to start
2021-05-01 01:18:05 +01:00
Roderick van Domburg
78850dd45b Merge remote-tracking branch 'upstream/dev' into fix-onevent-panic 2021-04-21 21:07:56 +02:00
johannesd3
e355d4a4f1
Add cache-size-limit command line argument 2021-04-21 11:29:32 +02:00
johannesd3
e9dc9cd839
Add size limit to cache 2021-04-21 11:29:08 +02:00
johannesd3
3e9aee1d46 Renamed variable 2021-04-10 15:08:39 +02:00
johannesd3
b4f9ae31e2 Fix clippy warnings 2021-04-10 14:06:41 +02:00
johannesd3
26c127c2ec Merge branch 'dev' into tokio_migration 2021-04-10 12:59:47 +02:00
johannesd3
5435ab3270 Fix compile errors in backends
fe37186 added the restriction that `Sink`s must be `Send`. It turned
out later that this restrictions was unnecessary, and since some
`Sink`s aren't `Send` yet, this restriction is lifted again.

librespot-org/librespot#601 refactored the `RodioSink` in order to make
it `Send`. These changes are partly reverted in favour of the initial
simpler design.

Furthermore, there were some compile errors in the gstreamer backend
which are hereby fixed.
2021-04-10 12:50:30 +02:00
johannesd3
7c3d89112d Fix clippy warnings 2021-04-09 10:45:43 +02:00
johannesd3
f5274f5ada Merge branch 'dev' into tokio_migration 2021-04-09 10:39:06 +02:00
Roderick van Domburg
0149725d77 Log error instead of panicking when child fails to start 2021-03-31 22:16:34 +02:00
Roderick van Domburg
770ea15498 Add support for S24 and S24_3 output formats 2021-03-17 00:00:27 +01:00
Roderick van Domburg
9dcaeee6d4 Default to S16 output 2021-03-16 20:22:00 +01:00
Roderick van Domburg
309e26456e Rename steepness to knee 2021-03-14 14:28:16 +01:00
Roderick van Domburg
5f26a745d7 Add support for S32 output format
While at it, add a small tweak when converting "silent" samples
from float to integer. This ensures 0.0 converts to 0 and vice
versa.
2021-03-13 23:43:24 +01:00
Roderick van Domburg
5257be7824 Add command-line option to set F32 or S16 bit output
Usage: `--format {F32|S16}`. Default is F32.

 - Implemented for all backends, except for JACK audio which itself
 only supports 32-bit output at this time. Setting JACK audio to S16
 will panic and instruct the user to set output to F32.

 - The F32 default works fine for Rodio on macOS, but not on Raspian 10
 with Alsa as host. Therefore users on Linux systems are warned to set
 output to S16 in case of garbled sound with Rodio. This seems an issue
 with cpal incorrectly detecting the output stream format.

 - While at it, DRY up lots of code in the backends and by that virtue,
 also enable OggData passthrough on the subprocess backend.

 - I tested Rodio, ALSA, pipe and subprocess quite a bit, and call on
 others to join in and test the other backends.
2021-03-12 23:09:15 +01:00
Roderick van Domburg
f29e5212c4 High-resolution volume control and normalisation
- Store and output samples as 32-bit floats instead of 16-bit integers.
   This provides 24-25 bits of transparency, allowing for 42-48 dB of
   headroom to do volume control and normalisation without throwing
   away bits or dropping dynamic range below 96 dB CD quality.

 - Perform volume control and normalisation in 64-bit arithmetic.

 - Add a dynamic limiter with configurable threshold, attack time,
   release or decay time, and steepness for the sigmoid transfer
   function. This mimics the native Spotify limiter, offering greater
   dynamic range than the old limiter, that just reduced overall gain
   to prevent clipping.

 - Make the configurable threshold also apply to the old limiter, which
   is still available.

Resolves: librespot-org/librespot#608
2021-03-12 23:09:15 +01:00
johannesd3
059b9029de Remove redundant field names 2021-03-10 22:41:46 +01:00
johannesd3
5616004dbe Fix many clippy lints
...and other small improvements
2021-03-10 22:41:44 +01:00
Evan Cameron
3388508141
use current_thread 2021-02-28 22:09:46 -05:00
Evan Cameron
6a33eb4efa
minor cleanup 2021-02-28 21:54:19 -05:00
Ash
56f1fb6dae
Merge pull request #595 from Johannesd3/const_versions
Replace version functions by constants
2021-02-26 10:47:44 +01:00
johannesd3
b606d8c661 Replace "extern crate"s 2021-02-23 22:22:53 +01:00
johannesd3
18179e73ec Remove unused dependencies and fix feature flags 2021-02-23 22:22:53 +01:00
johannesd3
d064ffc670 Use tokio channels and fix compilation errors 2021-02-23 22:22:53 +01:00
johannesd3
9253be7bc9 Small refactor of librespot-core
* Remove default impl for `SessionConfig`
* Move util mod to single file
* Restore privacy of mods
* Move `fn get_credentials` to application
* Remove `extern crate` statements
2021-02-23 22:22:51 +01:00
johannesd3
678d1777fd Merge branch 'dev' into tokio_migration 2021-02-23 22:22:49 +01:00
Sasha Hilton
4beb3d5e60 Add version string CLI parameter, set name to optional parameter, default to 'librespot' 2021-02-23 18:35:57 +00:00
Philippe G
34bc286d9b ogg passthrough
rename
2021-02-22 13:45:53 -08:00
johannesd3
220061e158 Migrate application to tokio 1.0 2021-02-21 17:05:36 +01:00
johannesd3
daf7ecd23a Migrate librespot-connect to tokio 1.0 2021-02-21 14:09:31 +01:00
Johannes Dertmann
c8e45ab690 Modified startup message 2021-02-17 15:13:57 +01:00
johannesd3
872fab62d8 Merge branch 'dev' into tokio_migration 2021-02-10 21:51:33 +01:00
johannesd3
09e506ed66 Replace version functions by constants 2021-02-09 19:42:56 +01:00
Sasha Hilton
84ba421818
Merge pull request #566 from xou816/fix/map-auth-errors
fix: map authentication errors to a custom error type
2021-02-06 02:54:11 +00:00
Alexandre Trendel
71e9295ee8 fix: map authentication errors to a custom error type 2021-02-05 14:26:32 +01:00
Sasha Hilton
632894a13e
Merge pull request #526 from marcelbuesing/align-player-events
Align PLAYER_EVENT naming
2021-02-05 04:25:43 +00:00
Sasha Hilton
24486c8c83
Merge pull request #573 from librespot-org/album-normalisation
Add option to choose between track or album normalisation gain
2021-02-05 04:19:09 +00:00
Sasha Hilton
318c499dc5 Change opt message to reflect default selection accurately. 2021-01-30 02:31:16 +00:00
johannesd3
fd1f049572 Removed volume struct 2021-01-25 10:52:06 +01:00
johannesd3
fa5c9f7d11 Made locations in cache optional
The locations of credentials, volume and audio are now stored
in three separate Optional<PathBuf>s.
Removed the clearing of the cache if an error occurs. This might
be added again later.
2021-01-25 10:48:14 +01:00
johannesd3
14a004f84c Refactored Cache
Proper error handling, and moving the conversion between
{ credentials, volume } and file into the cache module
2021-01-25 10:47:42 +01:00
johannesd3
91d7d0422b Preparing main crate for testing 2021-01-25 09:04:47 +01:00
johannesd3
fe37186804 Make librespot_playback work 2021-01-25 09:04:33 +01:00
Sasha Hilton
efabb03631 Fix incorrect cache initialisation causing crash on startup 2021-01-24 23:21:35 +00:00
Sasha Hilton
37a5796a86 Add option to choose between track or album normalisation gain, default album. 2021-01-21 19:16:05 +00:00
Sasha Hilton
414383db18
Merge pull request #506 from LaurentLouf/feature-split_cache_folders
Feature split cache folders, resolves #505
2021-01-02 23:17:33 +00:00
maxthiel
2f7bf54076 Add a preload event to warn about new track coming soon 2020-12-10 21:17:41 +00:00
marcelbuesing
a3774632a0
Align PLAYER_EVENT naming 2020-09-25 16:11:30 +02:00
ashthespy
3dfad7f788 Implement mapped volume for alsa mixer 2020-07-29 15:59:45 +01:00