Buffer further ahead on the phone for slow networks
The phone app now keeps up to ten minutes buffered (capped at 48 MB), and after a stall waits for ten seconds of audio before resuming, so a weak link doesn't stutter. Once the current track has finished loading, the next one is fetched into a 256 MB disk cache, still encrypted, so it starts at once. Both are set by a Buffering passed to AppState; the TV keeps ExoPlayer's defaults and no audio cache. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
39ab994a02
commit
c13a4053ac
6 files changed
+145
-4
No files matched your search
@@ -16,6 +16,7 @@ import coil3.request.crossfade
|
||||
import it.panov.musyx.api.Lrclib
|
||||
import it.panov.musyx.data.CredentialStore
|
||||
import it.panov.musyx.data.SettingsStore
|
||||
import it.panov.musyx.player.Buffering
|
||||
import it.panov.musyx.state.AppState
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
@@ -41,6 +42,8 @@ class Musyx : Application(), SingletonImageLoader.Factory {
|
||||
clearCovers = {
|
||||
withContext(Dispatchers.IO) { SingletonImageLoader.get(this@Musyx).diskCache?.clear() }
|
||||
},
|
||||
// Mobile data slows and drops out: buffer whole tracks and preload the next one.
|
||||
buffering = Buffering.Mobile,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user