Jump to content

Song caching for better gapless


carborundum

Recommended Posts

Hi

I'm using Poweramp on lg v20 android 8. All my library is on the sd card, full with flac music and some album need to be played in gapless mode. The problem is that every time the song changes to the next one there is a small pause that is very annoying. Strangely this problem is not present when i play the same album from internal storage. Something make me think that android just shutdown the sd card when not in use and take a while to read all files again. The problem is not solved when i set the buffer to the max time, it is not working. 

My request is to implement cache like in the old ipod classic. That device has 32mb of ram that is loaded with music so the internal hard drive can be shut down for power saving and turn on just to preload stuff

Link to comment
Share on other sites

So i made some tests. I copied the same 2 album from sd to internal storage and played them both in different scenarios. One album if flac other one is mp3. 

Internal storage

Flac plays flawlessly with gapless on wired headset, bluetooth and on board speaker

Mp3 plays kinda gapless on wired, bluetooth and on board speaker. Maybe its due to the absense of cut silence feature

Sd card

Flac has a little stop when track is changing so does the mp3 files on wired, blietooth and on board speaker. There are some skips even during playback indipendently of the buffer size. Strangely i have 0 gap on my ipod classic 5g with mp3, its not able to play flac directly but with rockbox i was able to play flac gaplessly.

For me the problem is the sd card latency, they are pretty fast but need seconds to access data. Instead internal storage is much faster but also has less latency in order of ms. Maybe this issue can be resolved preloading, just saying, 100mb of music into ram and playing it from there. 

Ask me everything, i will help you test whatever i can

Link to comment
Share on other sites

The problem is that I can't reproduce this on any device with any sd card. So this is not a sd card + player + device issue, there is the 4th factor. I will try to find it, suspects are:

- heavily fragmented or otherwise very slow sd card (though I can't reproduce on class 4 sdcard)

- some concurrent sd card I/O (on some Android firmwares / file systems the access to sdcard is strictly queued and no parallel access is possible) - e.g. after some tracks are uploaded to the device and very slow system media scanner scans them

- some CPU bound background processing 

Also there are plans to optionally pre-open next track earlier (e.g. in few seconds before previous one ends).

Link to comment
Share on other sites

Just dropping by since some of us, including me and @eserim are facing the eact same problem. Maybe we can use this thread to give info to @maxmp to help him solve the problem. 

Good to read that Max is planning to ad a feature which pre-opens the next track. I'm quite hopefull this will solve the issue. 

In the meantime:

- heavily fragmented or otherwise very slow sd card (though I can't reproduce on class 4 sdcard)
First of all, too bad you can't reproduce the problem. Can it depend on the size of the SD card? I'm using a Samsung EVO 256GB class 10 card, which should be faster than the class 4 you tested with. 
Secondly: I don't think this is the problem. I only used this SD card in this phone, Formated the SD once and only few times added my library. The SD is only used for music. If you want I can try to format it, and readd the entire library to see if it makes a differnce. May take a while though.

 - some concurrent sd card I/O (on some Android firmwares / file systems the access to sdcard is strictly queued and no parallel access is possible) - e.g. after some tracks are uploaded to the device and very slow system media scanner scans them
This might be the most likely source of the problem. Is there anyway how we van check this?

- some CPU bound background processing
Less likeley. The problem is there after a reboot, cleared cache, cleared memory and without any heavy background processes running as far as I know. A Snapdragon 820 should be capable enough. 

Thnx everybody!

 

Link to comment
Share on other sites

1 hour ago, Mr. Make Believe said:

If you want I can try to format it, and readd the entire library to see if it makes a differnce. May take a while though.

 

That can't do any harm. If you have created any internal playlists, be aware that Android will most likely rename the path to this 'new' SD Card, so back up the the playlists first.

Andre

Link to comment
Share on other sites

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...