rodio
rodio copied to clipboard
Gapless Playback
This is a feature request for true gapless playback... It seems that there is still a small silence between tracks if I add two mp3-Files as Source
s to a Sink
How hard would it be to implement this? (I'm considering adding it myself but am still somewhat of a rust newbie)
There's not supposed to be a gap!
Then I'll test some more, I only tried it with two files.
I didn't know that rodio already supports it, please put it in the README or the documentation, because this is an important feature which some of the most popular media players don't have.
I tested it with more files and those two seem to be the only ones which have a noticeably longer gap between them (compared to mpd, both tested via pulseaudio and plugged-in headphones) Those files are also the only ones which are vbr-encoded. But as the gap is really short this is not a big issue.
Feel free to close this if you think that this is too much effort to debug with too little gain.
AFAIK the MP3 format, due to the lossy nature of how it encodes audio, does not accurately encode the start or the end of the sound stream. An MP3 file might have some silence or distortion at the very start or very end of the file which was not present in the original audio source that it was encoded from. If you are unlucky, this might result in a noticeable audible gap between songs when you play multiple MP3 files, even if the player is truly gapless. I am guessing that this is what you are experiencing, especially since you said that only those particular files you tested show this behaviour. This is just as a result of how the MP3 format works, although it might definitely be worse or better depending on the encoder that was used to produce the MP3. If you want a true gapless audio experience, do not use MP3.
If you have no choice (you only have MP3s; no copy of the original audio to encode it into another format), then I guess maybe you could work around this by trying to somehow do a little crossfade between the files to smudge them together and hope it makes the gap less noticeable?
Created a pr #454 that should resolve this issue when using rodio with symphonia, which is the default