i have an issue , i hire someone to make music app , but when we try to play audio file located in server , it gave some latency 6-8 seconds , in other music app it takes milliseconds only , how can we make suck like that speed of playing
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions about writing and publishing Android apps, writing custom ROMs, and other topics that are primarily of concern to developers are off-topic. Consider taking advantage of other resources that may be appropriate for your question." – beeshyams, Andy Yan, Dan Hulme
It sounds like the answer will turn out to be related to the power-saving settings on your server. Specifically, the timeouts on the hard drives.
If it takes milliseconds it is probably because the drive is already spinning, and when it takes 6-8 seconds it is probably because the drive has powered down and needs to spin up before looking for the file.
Having more than one drive exacerbates this problem. If a music file is playing for some time on one drive, another might spin down. Picking another song from the first drive will play very soon, but picking something from the other drive will involve some time lag before the drive is ready.
But it can also happen on a single drive if the music file is first loaded into RAM before playing. In that case, short songs will finish before the drive spins down, but longer ones might give it time enough to see no activity and think it isn't needed.
My recommendation is always to disable power-saving mode on hard drives. They tend to last longer if they are not constantly being turned off and on all the time.