[PR #144] [MERGED] fix: fix fast relative volume updates #231

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

📋 Pull Request Information

Original PR: https://github.com/devgianlu/go-librespot/pull/144
Author: @aykevl
Created: 11/13/2024
Status: Merged
Merged: 11/13/2024
Merged by: @devgianlu

Base: masterHead: fix-relative-volume-updates


📝 Commits (1)

  • 4cd52f3 fix: fix fast relative volume updates

📊 Changes

2 files changed (+3 additions, -11 deletions)

View changed files

📝 cmd/daemon/controls.go (+1 -8)
📝 cmd/daemon/player.go (+2 -3)

📄 Description

Relative volume changes would use old values, not the new value set by a volume change in the last second. To fix this, update the player state immediately and only delay sending the update (instead of also delaying the update to the player state).

This could mean that another change (such as play/pause) would send an earlier volume update, but I don't think that's a problem. We'll send a PutStateReason_VOLUME_CHANGED anyway after a second.

Fixes https://github.com/devgianlu/go-librespot/issues/141

This is an alternative to #142


🔄 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/144 **Author:** [@aykevl](https://github.com/aykevl) **Created:** 11/13/2024 **Status:** ✅ Merged **Merged:** 11/13/2024 **Merged by:** [@devgianlu](https://github.com/devgianlu) **Base:** `master` ← **Head:** `fix-relative-volume-updates` --- ### 📝 Commits (1) - [`4cd52f3`](https://github.com/devgianlu/go-librespot/commit/4cd52f303d70f1dcfbc1a3767846de37e0c00b03) fix: fix fast relative volume updates ### 📊 Changes **2 files changed** (+3 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `cmd/daemon/controls.go` (+1 -8) 📝 `cmd/daemon/player.go` (+2 -3) </details> ### 📄 Description Relative volume changes would use old values, not the new value set by a volume change in the last second. To fix this, update the player state immediately and only delay sending the update (instead of also delaying the update to the player state). This could mean that another change (such as play/pause) would send an earlier volume update, but I don't think that's a problem. We'll send a PutStateReason_VOLUME_CHANGED anyway after a second. Fixes https://github.com/devgianlu/go-librespot/issues/141 This is an alternative to #142 --- <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:20 +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#231
No description provided.