Commit graph

379 commits

Author SHA1 Message Date
Christian König caf8029953
Update alsa to 0.9.0
Signed-off-by: Christian König <ckoenig@posteo.de>
2024-02-24 21:08:01 +01:00
Domenico Cerasuolo e175a88f5b Make audio fetch parameters tunable
This change collects all those audio fetch parameters that were defined as
static constants into a dedicated struct, AudioFetchParams.
This struct can be read and set statically, allowing a user of the library to
modify those parameters without the need to recompile.
2023-12-20 22:07:42 +01:00
dependabot[bot] 2bbd27bc5d
Bump zerocopy from 0.7.26 to 0.7.31
Bumps [zerocopy](https://github.com/google/zerocopy) from 0.7.26 to 0.7.31.
- [Release notes](https://github.com/google/zerocopy/releases)
- [Changelog](https://github.com/google/zerocopy/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google/zerocopy/compare/v0.7.26...v0.7.31)

---
updated-dependencies:
- dependency-name: zerocopy
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-15 03:52:16 +00:00
Kees Hink e6d8efeb2b Fix spelling: replace "it's" with "its" where a possessive is meant 2023-11-18 14:06:59 +01:00
Roderick van Domburg a8fcd99eb9
Merge pull request #1224 from yubiuser/update/dependencies
Update/dependencies
2023-11-15 20:38:11 +01:00
Jean-Rémy Falleri 9541e8820f feat: do not stop sink in gapless mode. 2023-11-15 08:53:53 +01:00
Christian König 88c8babdf1
gstreamer pipeline constructors don't take the optional name
parameter anymore

Signed-off-by: Christian König <ckoenig@posteo.de>
2023-11-14 23:44:21 +01:00
Christian König c01742c010
Update zerocopy to 0.7.26
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-11-14 23:29:09 +01:00
Christian König dd07be41af
Update gstreamer to 0.21.2
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-11-14 23:13:25 +01:00
Christian König 36c939c12a
Update alsa to 0.8.1
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-11-14 23:06:34 +01:00
Christian König 84804b6bfc Update glib
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-08-23 21:54:17 +02:00
Jarkko Lehtoranta e3db0994bc
Use single player and mixer instances 2023-07-19 14:49:17 +03:00
Jarkko Lehtoranta c6b62b82d4
Allow player session changes 2023-07-19 14:49:17 +03:00
Jarkko Lehtoranta ddadcc9ea0
Add a health check method to player 2023-07-19 14:49:17 +03:00
Jarkko Lehtoranta 46195f18d6
Handle play_request_id as an event 2023-07-19 14:49:05 +03:00
Wang Guan d6257c41ca make clippy happy: clippy::default-constructed-unit-structs 2023-07-14 00:21:37 +09:00
JasonLG1979 f89c622e30 Read Normalisation Data in one go
Read all the Normalisation Data in one shot to avoid 4 seperate reads.
2023-05-13 13:00:50 -05:00
AeRo 31d18f7e30
Respect disabled normalisation with maximum volume (#1159) 2023-05-06 09:47:08 +02:00
yubiuser e14dac3ff3
Remove and update dependencies (#1140) 2023-04-11 20:33:45 +02:00
Roderick van Domburg d569d37966
Merge pull request #1136 from eladyn/jack_update
update jack to match alsa requirement
2023-03-22 13:38:52 +01:00
eladyn 9836db2c2c
update jack to match alsa requirement 2023-03-22 13:35:15 +01:00
Federico a50d0d4510
Update rodio to 0.17.1 and cpal to 0.15.1 #1191
Inherit upstream fix https://github.com/RustAudio/cpal/pull/648
2023-03-17 14:57:40 +01:00
Petr Tesarik c600297f52 Fix newly reported clippy errors
- Use variables directly in format strings.
  As reported by clippy, variables can be used directly in the
  `format!` string.
- Use rewind() instead of seeking to 0.
- Remove superfluous & and ref.

Signed-off-by: Petr Tesarik <petr@tesarici.cz>
2023-01-27 23:15:51 +01:00
Guillaume Desmottes 7f2cb684c9 fix clippy warnings 2023-01-03 00:36:35 +01:00
Roderick van Domburg eb1472c713
Various loading improvements
- Improve responsiveness by downloading the smallest possible chunk
  size when seeking or first loading.

- Improve download time and decrease CPU usage by downloading the
  largest possible chunk size as throughput allows, still allowing
  for reasonable seek responsiveness (~1 second).

- As a result, take refactoring opportunities: simplify prefetching
  logic, download threading, command sending, and some ergonomics.

- Fix disappearing controls in the Spotify mobile UI while loading.

- Fix handling of seek, pause, and play commands while loading.

- Fix download rate calculation (don't use the Mercury rate).

- Fix ping time calculation under lock contention.
2022-09-28 21:25:56 +02:00
JasonLG1979 8545f361c4 Major Events Overhaul
Special thanks to @eladyn for all of their help and suggestions.

* Add all player events to `player_event_handler.rs`

* Move event handler code to `player_event_handler.rs`

* Add session events

* Clean up and de-noise events and event firing

* Added metadata support via a TrackChanged event

* Add `event_handler_example.py`

* Handle invalid track start positions by just starting the track from the beginning

* Add repeat support to `spirc.rs`

* Add `disconnect`, `set_position_ms` and `set_volume` to `spirc.rs`

* Set `PlayStatus` to the correct value when Player is loading to avoid blanking out the controls when `self.play_status` is `LoadingPlay` or `LoadingPause` in `spirc.rs`

* Handle attempts to play local files better by basically ignoring attempts to load them in `handle_remote_update` in `spirc.rs`

* Add an event worker thread that runs async to the main thread(s) but sync to itself to prevent potential data races for event consumers.

* Get rid of (probably harmless) `.unwrap()` in `main.rs`

* Ensure that events are emited in a logical order and at logical times

* Handle invalid and disappearing devices better

* Ignore SpircCommands unless we're active with the exception of ShutDown
2022-09-17 16:21:10 -05:00
Roderick van Domburg 9d80521e09
Fix warning and clippy lints 2022-08-22 22:38:19 +02:00
Roderick van Domburg 2a79af1f0a
Migrate to Rust 2021 2022-08-02 21:42:38 +02:00
sqozz d09ee4206c Add minimum rust version 2022-08-01 15:14:17 +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 37794c5b78
Merge branch 'new-api' into dev 2022-07-29 23:39:06 +02:00
Roderick van Domburg 6537c441c3
Update Cargo.lock 2022-07-29 22:05:10 +02:00
Roderick van Domburg 05b9b13cf8
Merge branch 'dev' into new-api and update crates 2022-07-27 23:31:11 +02:00
Roderick van Domburg 9385dc840f
Merge pull request #1014 from JasonLG1979/improve-subprocess-backend
Improve the subprocess backend
2022-07-18 22:21:12 +02:00
JasonLG1979 2532687cc6 Improve pipe backend
* Implement stop
* Better error handling
2022-06-30 21:57:23 -05:00
Jason Gray 9b2490e4e1
Merge branch 'librespot-org:dev' into improve-subprocess-backend 2022-06-30 21:33:47 -05:00
JasonLG1979 0d4367fca2 Improve the subprocess backend
Better error handling.

Move the checking of the shell command to start so a proper error can be thrown if it's None.

Use write instead of write_all for finer grained error handling and the ability to attempt a restart on write errors.

Use try_wait to skip flushing and killing the process if it's already dead.

Stop the player on shutdown to *mostly* prevent write errors from spamming the logs during shutdown. Previously Ctrl+c always resulted in a write error.
2022-06-20 17:19:31 -05:00
JasonLG1979 5a10a963ff Minor alsa backend tweaks
Silence a clippy warning and we don't need `std::cmp::min` when `usize` already has `min`.
2022-06-18 09:08:04 -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 88e64bd884
Update Cargo.lock 2022-05-23 21:43:16 +02:00
JasonLG1979 0b7508a2bf Update deps round 2 2022-05-23 13:17:18 -05:00
JasonLG1979 c03d3ad102 Bump deps
This bumps deps that don't need major code refactoring or MSRV bumps.
2022-05-23 10:19:54 -05:00
Roderick van Domburg dff19377fa
Update version numbers to 0.4.0 2022-05-21 22:31:15 +02:00
Roderick van Domburg b08502c801
Update crates 2022-05-21 21:51:37 +02:00
Roderick van Domburg 2a3e248bba
Fix clippy lints 2022-05-21 21:36:56 +02:00
Sean McNamara 3d298768b3
Backport #964 GStreamer backend cleanup (#979) 2022-05-21 20:55:55 +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
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 1290ee9925
Fix clippy warnings 2022-04-07 22:32:43 +02:00