mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#1273
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/librespot-org/librespot/pull/1196
Author: @JoeyEamigh
Created: 8/6/2023
Status: ❌ Closed
Base:
dev← Head:control-sink-write-speed📝 Commits (2)
5c63476adding option and flag to limit sink write ratesd3a24a5finish hooking up config changes📊 Changes
3 files changed (+40 additions, -1 deletions)
View changed files
📝
playback/src/config.rs(+2 -0)📝
playback/src/player.rs(+27 -1)📝
src/main.rs(+11 -0)📄 Description
Hello!
Earlier today I opened #1195 which talks about how certain backends without buffering may accept all of the audio packets from librespot as soon as they are available, leading songs to end seconds after they begin. This PR is one option at addressing that.
This PR adds a flag and option called
--limit-sink-write, which effectively checks if the sink writes are running faster than the speed at which the song should be playing, and if so sleeps for the difference.I am not sure if this is the best way to be doing this, but it was the most consistent of any method I tried. Limiting based on bitrate alone left the song about 10 seconds ahead on librespot's side, and backed-specific implementation didn't make much sense for me due to my relative lack of knowledge on this topic.
Hopefully this PR is helpful, but if not hopefully it gives y'all a bit of insight into a way of fixing #1195 that does work.
Thanks!
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.