Okay, thanks. So to sync audio across devices we use SnapCast which has a typical deviation of less than 0.2ms. SnapCast is extremely stable so it’s not very likely that software is at fault here. For starters, make sure you are using balenaSound version 2.0.5 or later, we updated snapcast to it’s latest version on that patch so that will ensure you are up to date.
What I suspect the problem to be here is the differences in audio processing after it goes out of the Pi and into the speakers. Particularly, the TV I think probably has audio circuitry or additional processing that is making it out of sync. The
snapclient has an option to compensate for this, support for it is not included in balenaSound at the moment, but I just created a branch you can check out: https://github.com/balenalabs/balena-sound/tree/snapclient-latency
Note that this is not tested as I can’t replicate the hardware out-of-syncing thing, but if you are up for testing it, this is what you need to do:
- Download the updated code in https://github.com/balenalabs/balena-sound/tree/snapclient-latency
- Push the new branch to your devices using
balena push <appName>, or using git, same as you did the first time.
- Go to the balena dashboard, to the device that you think is behind (so the one that is late or more delayed) and add a Device environment variable (
Device variables on the side bar) called
DEVICE_LATENCY and assign it a value in msec. The exact value you will need to find out for yourself empirically, I suggest starting with 100 and go from there.
- Wait for device reboot, and test again. You might have to adjust the latency value a couple of times until you find one that works.
If this does work please let us know so that we can push this changes into the master branch and make balenaSound more awesome!