3 ms·
Slim Devices' squeezebox had this feature before Sonos. I implemented it in high school using visual basic. The most non-trivial part is that if you try to sync
by cosmotic 5y ago
Slim Devices' squeezebox had this feature before Sonos. I implemented it in high school using visual basic. The most non-trivial part is that if you try to synchronize an MP3 or other encoded stream instead of the decoded PCM stream, you end up seeking to mid-frame points which causes invisible adjustments to the seek point.
In the end, it's as simple as 'seek to this point' and then check if the point is off by less than some threshold, don't do anything. I did a few other fancy things like not seeking until the 'heart beat' lined up a few times in a row (duration in heartbeat was same as difference in time since last heartbeat).