badaix / snapdroid

Snapcast client for Android
GNU General Public License v3.0
124 stars 25 forks source link

Audio Drops on Android Clients #43

Open hav0ck opened 3 years ago

hav0ck commented 3 years ago

I'm not sure how best to troubleshoot this, what to look or even really where to look.

I have Snapserver running on a Ubuntu 18.04 VM (running on ESXi 6.5). There are no audio devices assigned to this VM. I had Mopidy setup on this VM with Snapcast but it was incredibly unstable so I switched to MDP with Rompr as the frontend.

Currently I have 2 clients connected to the server, both are Android devices, one is a Samsung A5 which is running Snapcast V24.0 and the other is an older Marshmellow based Android device which is still running V22.0. The Samsung is used for testing and the older Android phone is being used to supply my deck speakers.

I have always experience some audio drops when using Snapcast. Last week I updated the Snap server to: Version 0.24.0, revision 7eff45fd but the audio drops continue and they may have gotten worse.

Apart from the drops, the quality is great. I'd love to get the audio drops sorted out, I'm so close to having a great multi-room setup, but the drops are holding me back.

My snapserver.conf file is:

[server]
[http]
enabled = true
bind_to_address = 0.0.0.0
port = 1780
[tcp]
[stream]
source = pipe:///tmp/snapfifo?name=default
[logging]

I only have the HTTP section set for Rompr control but that isn't working very well on Rompr's end.

Chaphasilor commented 2 years ago

I'm guessing this could be solved by increasing the buffer size, like it is possible with the linux clients (see the docs here, in the Parameters column). I'm not sure if this option exists for the Android app though.

What you could do is setup a linux player just for testing, and see if you get the drops there as well, and if it helps to increase the buffer_time of the client.

Another possible solution might be to prioritize your Android devices in your router's settings (that is, if your router has that feature). This could help with making sure the audio packets get to the device in time.

I'm honestly just guessing here (I haven't even installed Snapcast yet), but I hope it helps nonetheless!