Gapless playback has a gap sometimes while switching songs

Issue description:

While playing gapless albums, sometimes a slight gap is heard while switching songs. It seems to only happen when the two songs are in different qualities (in my case: flac & transcoded ogg/vorbis 192kb/s), even if both of the files should be cached. Switching between cached flac & remote flac seems unaffected.

Logs:

Upload description: Roukanken

Additional information:

 
In my logs there are 3 natural switches between songs:

  1. perma cached, full quality → transcoded file which should be in playback cache (has a gap)
  2. with wifi turned on: another perma cached, full quality → file which has transcoded in playback cache, but that shouldn’t matter? (had a gap, probably didn’t yet register that wifi is on? Unsure)
  3. repeated step 2, haven’t got a gap

(Not in logs, but clearing playback cache, and then repeating step 2 while on wifi, hasn’t got a gap either.)
 

Reproduction steps:

 

  1. Get a gapless album
  2. Cache only some songs in full quality
  3. Play through it while transcoding remote ones / using cached transcoded in playback
     

Media provider:

Jellyfin

Screenshots:

     

This is normal, you can’t gapless between different formats and quality, there’s no magic here.