07-30-2019, 08:41 AM
I changed the systemd script and added a configuration file to set the buffer size for bluez alsa.
In detail, I added --pcm-buffer-time=<buffer_time> parameter to bluealsa-aplay command line.
At the end, it is enough to change the BUFFERTIME value in /etc/bluealsaaplay.conf.
I had no success in setting values lower than 20000 (20ms) on my Pi1, but it is enough to watch movies with moode as audio sink.
In detail, I added --pcm-buffer-time=<buffer_time> parameter to bluealsa-aplay command line.
At the end, it is enough to change the BUFFERTIME value in /etc/bluealsaaplay.conf.
I had no success in setting values lower than 20000 (20ms) on my Pi1, but it is enough to watch movies with moode as audio sink.
Code:
echo 'BUFFERTIME=20000' >> /etc/bluealsaaplay.conf
sed -i 's|bluealsa-aplay --profile-a2dp|bluealsa-aplay --pcm-buffer-time=${BUFFERTIME} --profile-a2dp|g' /etc/systemd/system/bluealsa-aplay@.service