node-airplayhub icon indicating copy to clipboard operation
node-airplayhub copied to clipboard

Mitigating Audio Drops

Open jdtsmith opened this issue 7 years ago • 1 comments

Thanks for this great tool. I've been streaming music from an iPhone to two (or three) destinations: a shairport-sync service running on the same Raspberry PI 3 where airplayhub runs, a new airport express, and an old flip-plug style airport express. In general this works well, with great sync. Some extra delay to start/stop/skip, but that's understandable given the double-buffering. It does seems somewhat sensitive to audio drops and gaps. Interestingly, this seems to have plenty to do with the CPU load on my RPI3. I also run homebridge on the same pi, and in fact have just recently written a home bridge plugin to make individual accessories to control speaker volume and mute. This is working well (except Apple doesn't yet actually support it's "Speaker" accessory), but using homebridge to set volume really increases the rate of the audio drops. If airplayhub is using say 25-30% CPU, and homebridge jumps in with another 25%, that seems to do it. Sometimes drop come from nowhere though. I have some evidence that playing music from a 3rd device (e.g. my laptop) improves this. So possibly the phone is the limiting issue. Is there any way to increase or play with the buffer depth, i.e. incur an extra ~second of buffering to limit these drops?

jdtsmith avatar May 04 '17 03:05 jdtsmith

I am interested in this as well, my Node-airplayhub also has a vpnservrr Running and suddenly Audio Starts dropping

Goeste avatar Sep 18 '17 12:09 Goeste