This should fix remaining cases of a client connecting, and failing
to start playback from *beyond* the beginning when `librespot` is
still loading that track.
This undoes the `suppress_loading_status` workaround from #430,
under the assumption that the race condition reported there has
since been fixed on Spotify's end.
Further changes:
- Improve some debug and trace messages
- Default to streaming download strategy
- Synchronize mixer volume on loading play
- Use default normalisation values when the file position isn't
exactly what we need it to be
- Update track position only when the decoder reports a
successful seek
Dynamically set the alsa buffer and period based on the device's reported min/max buffer and period sizes. In the event of failure use the device's defaults.
This should have no effect on devices that allow for reasonable buffer and period sizes but would allow us to be more forgiving with less reasonable devices or configurations.
Closes: https://github.com/librespot-org/librespot/issues/895
Fix up for #886Closes: #898
And...
* Don't silently ignore non-Unicode while parsing env vars.
* Iterating over `std::env::args` will panic! on invalid unicode. Let's not do that. `getopts` will catch missing args and exit if those args are required after our error message about the arg not being valid unicode.
* Gaurd against empty strings. There are a few places while parsing options strings that we don't immediately evaluate their validity let's at least makes sure that they are not empty if present.
* `args` is only used in `get_setup` it doesn't need to be in main.
* Nicer help header.
* Get rid of `use std::io::{stderr, Write};` and just use `rpassword::prompt_password_stderr`.
* Get rid of `get_credentials` it was clunky, ugly and only used once. There is no need for it to be a separate function.
* Handle an empty password prompt and password prompt parsing errors.
* + Other random misc clean ups.