question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Gapless playback not working on latest dev code

See original GitHub issue

Describe the bug There is a very noticeable gap of 0.2 to 1 second between tracks when playing Spotify music through librespot-java. I checked out the code and see two potential sources of the problem. 1. we call state.updated() before trackHandler.pushToMixer(reason) when about to play the next preloaded track. This invokes a network call that can take a long time to run. 2. we call trackHandler.seek(state.getPosition()) somewhat pointlessly when crossfading is not enabled.

To Reproduce Check out latest dev code on OS X, run librespot-java with no config changes (e.g. Zeroconf and no crossfade), then play something gapless. Examples tested - Dark Side of the Moon and Plastic Beach.

Expected behavior I expect to hear 0 gaps between the first and second tracks of the two example albums.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
devgianlucommented, Apr 5, 2020

This is an issue I’ve been putting aside for a while, but I guess it is time to move the state update calls to another thread. It is important to keep them in order so a queue is the more appropriate method. Will work on it.

0reactions
josephcarrollcommented, Apr 13, 2020

It’s almost perfect now. I think there is an issue around the next track being seeked a couple of milliseconds - but we should track it separately.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gapless playback is not working · Issue #8594 - GitHub
Issue description When trying to play a gapless playback between two MP3 files, a noticeable gap is detected between them. The issue is...
Read more >
Spotify Plugin - GAPLESS playback not working
My issue is that I cannot get the GAPLESS playback to work. ... I'm using volumio Primo with last software version.
Read more >
Gapless playback in Windows 10 - Microsoft Community
Hi there, I'm using the music app that came with Windows 10 technical preview and I noticed that there's no gapless playback.
Read more >
Music playback isn't gapless - SoundLink Revolve Bluetooth ...
3329. Music playback isn't gapless. Gapless playback is intended to provide a seamless listening experience when there is transition between songs.
Read more >
Add true gapless playback support to Chromecast Audio ...
Gapless playback should work with inherent gapless formats such as FLAC, WAV, ... Proof that Google Play Music is not gapless: play "Code...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found