How does MPD buffering work between tracks?
I have 0.19.14 running on a Raspberry Pi. The RPi is directly connected to a DAC via I2S. The music collection comes from an NFS mount; it is entirely 44/16 FLAC files from CD rips.
Everything generally works great, except sometimes the DAC loses I2S sync shortly after a track starts. So the new track starts, plays for maybe a second or two, then the DAC loses sync, which means no sound for about a second. It then starts playing in one channel with the other silent; then the first channel goes silent and the other starts playing; then both channels play and everything is fine until the end of the song.
This was happening rarely enough that I was prepared to live with it.
However, I was listening to one CD rip yesterday where it happened consistently on all tracks. This leaves me to believe there may be something peculiar about the files themselves?
Likewise, I see there are MPD buffering options. I have audio_buffer_size originally at the default (2048), and tried upping it to 8192. I have left buffer_before_play at 20%. Note I'm not manually changing tracks, just letting MPD naturally go from one track to the next.
At this point I'm really just looking for ideas as to what I might further investigate and tunings that might be worth playing with.
Need help with MPD?
2 posts • Page 1 of 1
If you really want to know: MPD starts decoding the following song as soon as there is enough space in the buffer, a long time before the current song ends. When the new song really begins, MPD's buffer is full already.matt_garman wrote:How does MPD buffering work between tracks?
(This is a simplification, and buffering is a pretty complex topic.)
Before we discuss anything else, upgrade to the latest (0.19.21 currently). Many MPD releases have optimizations, and if you're using an old release, you're not using the latest optimizations. MPD 0.20 (git master) has even more optimizations, and 0.20 final will be released very soon.I have 0.19.14 running
No, no, no. Do not mess with those. They don't help with your problem. You can only make things worse by changing these settings.Likewise, I see there are MPD buffering options.