01-09-2023, 03:29 PM
I did a little testing with locally attached USB drive and also remote NAS and it looks like MPD is in fact prefetching into RAM the track following the currently playing track.
Below is a verbose log edited for readability that shows the prefetch actions as tracks are being played. Input cache was set to 1 GB. Note that if Input cache is set to Disabled then no prefetch commands show up in the log.
Below is a verbose log edited for readability that shows the prefetch actions as tracks are being played. Input cache was set to 1 GB. Note that if Input cache is set to Disabled then no prefetch commands show up in the log.
Code:
# Queue order
LRMonoPhase4.flac
In The Blue Of The Evening.flac
You Got To My Head.flac
Velvet Moon.flac
Come Sunday.flac
pi@moode:~ $ tail -f /var/log/mpd/log
# Start Play: LRMonoPhase4.flac
Jan 09 09:39 : playlist: play "LRMonoPhase4.flac"
Jan 09 09:39 : playlist: queue song "In The Blue Of The Evening.flac"
Jan 09 09:39 : cache: Prefetch "In The Blue Of The Evening.flac"
Jan 09 09:40 : player: played "LRMonoPhase4.flac"
# Playing: In The Blue Of The Evening.flac
Jan 09 09:40 : playlist: queue song "You Got To My Head.flac"
Jan 09 09:40 : cache: Prefetch "You Got To My Head.flac"
Jan 09 09:44 : player: played "In The Blue Of The Evening.flac"
# Playing: You Got To My Head.flac
Jan 09 09:44 : playlist: queue song "Velvet Moon.flac"
Jan 09 09:44 : cache: Prefetch "Velvet Moon.flac"
Jan 09 09:48 : player: played "You Got To My Head.flac"
# Playing: Velvet Moon.flac
Jan 09 09:48 : playlist: queue song "Come Sunday.flac"
Jan 09 09:48 : cache: Prefetch "Come Sunday.flac"
.
.