mirror of
https://github.com/devgianlu/go-librespot.git
synced 2026-04-26 13:25:49 +03:00
[PR #3] [MERGED] feat: improved seeking #177
Labels
No labels
bug
enhancement
pull-request
spotify-side
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/go-librespot#177
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/devgianlu/go-librespot/pull/3
Author: @devgianlu
Created: 10/12/2023
Status: ✅ Merged
Merged: 10/18/2023
Merged by: @devgianlu
Base:
master← Head:improved-seeking📝 Commits (4)
b194d6eImprove resumed playback seek position15c229aParse ogg metadata page fully768c9eeEnsure proper ogg/vorbis cleanup8bc5cceDecoder cleanup and improved seeking📊 Changes
6 files changed (+293 additions, -190 deletions)
View changed files
➕
audio/metadata.go(+225 -0)➖
audio/replay_gain.go(+0 -50)📝
cmd/daemon/controls.go(+5 -0)📝
player/player.go(+7 -7)📝
vorbis/decoder.go(+56 -40)➖
vorbis/utils.go(+0 -93)📄 Description
This is an attempt at improving the seeking algorithm. The old way is completely bogus because lots of error adds up when seeking far from the beginning of the stream. The method implement now requires to fetch the entire stream to find the precise location which is not ideal.
This changes are required for a good playback experience on devices that use very long output buffers (pipewire on Fedora default to 10s): when pausing we throw away 10s of frames which must be rewinded in the decoder before resuming playback or they'll be lost.
Currently reverse enginnering the propertary seek table in the first ogg metadata page (mentioned here).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.