[PR #263] [CLOSED] WIP: Gapless playback #857

Closed
opened 2026-02-27 20:00:13 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/librespot-org/librespot/pull/263
Author: @ashthespy
Created: 11/11/2018
Status: Closed

Base: masterHead: gapless


📝 Commits (2)

📊 Changes

3 files changed (+147 additions, -14 deletions)

View changed files

📝 audio/src/lewton_decoder.rs (+7 -0)
📝 connect/src/spirc.rs (+23 -1)
📝 playback/src/player.rs (+117 -13)

📄 Description

Work in progress PR with the final goal of providing gapless playback.

Todo

  • Implement a channel b/w player and spirc thread for prefetch
  • Prefetch next track when current one is fully downloaded (instead of time based approach now)
  • Implement duration with other decoders as well if we are moving away from the time approach
  • Gapless playback

Discussions

Distinguish b/w playback state and loading state:

Currently when the decoder is done with the current file, the player thread fires off an EndOfTrack to spirc - signalling the loading of the next track. For gapless, we thus need to implement a buffer (or is it a queue), and distinguish b/w fetching/decrypting/decoding states and actual playback state.
Thoughts/ideas for this?


🔄 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/librespot-org/librespot/pull/263 **Author:** [@ashthespy](https://github.com/ashthespy) **Created:** 11/11/2018 **Status:** ❌ Closed **Base:** `master` ← **Head:** `gapless` --- ### 📝 Commits (2) - [`e1ab35b`](https://github.com/librespot-org/librespot/commit/e1ab35bdf0cbad7976e58b73518af9b63fa2a19f) WIP: Prefetch for gapless - [`0ffbf7f`](https://github.com/librespot-org/librespot/commit/0ffbf7f6262553331341a13b99ef579e055a5f16) Fix typo ### 📊 Changes **3 files changed** (+147 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `audio/src/lewton_decoder.rs` (+7 -0) 📝 `connect/src/spirc.rs` (+23 -1) 📝 `playback/src/player.rs` (+117 -13) </details> ### 📄 Description Work in progress PR with the final goal of providing gapless playback. ### Todo - [x] Implement a channel b/w `player` and `spirc` thread for prefetch - [ ] Prefetch next track when current one is fully downloaded (instead of time based approach now) - [ ] Implement `duration` with other decoders as well if we are moving away from the time approach - [ ] Gapless playback ### Discussions #### Distinguish b/w playback state and loading state: Currently when the decoder is done with the current file, the player thread fires off an `EndOfTrack` to `spirc` - signalling the loading of the next track. For gapless, we thus need to implement a buffer (or is it a queue), and distinguish b/w fetching/decrypting/decoding states and actual playback state. Thoughts/ideas for this? --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:00:13 +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/librespot#857
No description provided.