[PR #116] [CLOSED] fix: don't try to seek to the start of the song when starting from there #218

Closed
opened 2026-02-28 14:26:17 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/devgianlu/go-librespot/pull/116
Author: @aykevl
Created: 10/6/2024
Status: Closed

Base: masterHead: fix-play-start-stutter


📝 Commits (1)

  • 30057d7 fix: don't try to seek to the start of the song when starting from there

📊 Changes

1 file changed (+8 additions, -2 deletions)

View changed files

📝 player/player.go (+8 -2)

📄 Description

Apparently a bit of the song has already been decoded before the seek. When seeking after starting the vorbis decode, this causes the song to revert to time 0 causing a slight stutter.

The stutter is presumably still there when an actual seek is needed. But that's probably a less common case. A real fix would be to only start decoding after the seek (which doesn't seem to be the case here).


I'm not very happy with this fix. I feel like the real issue is in the vorbis decoder, which apparently already starts decoding in vorbis.New. But at least it works around a common case.

fixes #115


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/devgianlu/go-librespot/pull/116 **Author:** [@aykevl](https://github.com/aykevl) **Created:** 10/6/2024 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fix-play-start-stutter` --- ### 📝 Commits (1) - [`30057d7`](https://github.com/devgianlu/go-librespot/commit/30057d769a47127fb82db33a97662728a097f435) fix: don't try to seek to the start of the song when starting from there ### 📊 Changes **1 file changed** (+8 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `player/player.go` (+8 -2) </details> ### 📄 Description Apparently a bit of the song has already been decoded before the seek. When seeking after starting the vorbis decode, this causes the song to revert to time 0 causing a slight stutter. The stutter is presumably still there when an actual seek is needed. But that's probably a less common case. A real fix would be to only start decoding after the seek (which doesn't seem to be the case here). --- I'm not very happy with this fix. I feel like the real issue is in the vorbis decoder, which apparently already starts decoding in `vorbis.New`. But at least it works around a common case. fixes #115 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 14:26:17 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/go-librespot#218
No description provided.