How does the synchronisation of players work?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cadfish
    Member
    • Nov 2012
    • 78

    How does the synchronisation of players work?

    For a while I'm asking myself, how the synchronisation of separate players actually works.

    As far as I know, IP protocol exchanges messages - and the time of travel of the various packages can vary. So the only way I can think of, is that the players buffer a reasonable amount of data, and are all scheduled to start playing a track at a specific point in time (in the not too far future): e.g. "Start playing the following data at 10:00:00h GMT". But this would only work, if the player clocks are 100% synced. And now I'm back at start: how can LMS make sure the player clocks ARE synced, given the comunication is package based? It may be based on the roundtrip time (as can be watched with ping): if roundtrip time for one player is 20ms longer than for another, then LML could set the current time on this player to a "10ms later value" as compared to the other; so that the time of arrival of the message and the content do match. This would result in (kind of) synced clocks of the players. Asking the players for their time, minus half of the roundtrip time (from issueing the query until receiving the answer) should give the same time for all players if all goes well ... But as time of travel can vary between messages and between forth and back, the success of this method is not guaranteed, plus - which makes it worse - can not be verified.

    Am I completely wrong here - do they use a completely different approach? Is it even a Logitech secret or is it a well known standard approach?

    Any ideas?

    I hope this is not already discussed in another thread I missed.


    G�nther
    Primary System: LMS on Win 7 PC, 4 SBT, 1 Duet, 2 piCorePlayer (HifiMeDIY Sabre II DAC & HifiBerry DAC), 2 Duet Controller, 2 iPods, 1 iPhone (iPeng), Sony XPeria Mini & ION, Android Tablet (SqueezeControl, OrangeSqueeze, SqueezeCommander) -- Secondary System: Mobile Server based on SqueezePlug on RaspBerry PI

    Visit SBNetIO - yet another remote control plugin.
  • lrossouw
    Senior Member
    • Jan 2006
    • 1040

    #2
    In terms of sync, technically, I don't know much but there is tech to sync times between devices via IP. ntp time servers are an example here. This is how your computer can set it's clock to the time servers via the internet. These work over the open internet where latency is longer than your local lan. Over your local wifi/lan it should be easier to get clocks syncd.

    I guess once the concept of a common clock the rest is easier. Though I guess the clocks could drift so something needs to continue to keep the clocks in sync.

    If you are technically minded you can look at the code but I don't know where to start.
    Louis
    Last.fm

    Comment

    • lrossouw
      Senior Member
      • Jan 2006
      • 1040

      #3
      Was curious myself:
      Read here: http://forums.slimdevices.com/showth...ore)-SBs/page2
      Last edited by lrossouw; 2012-11-30, 09:46.
      Louis
      Last.fm

      Comment

      • lrossouw
        Senior Member
        • Jan 2006
        • 1040

        #4
        Even better source: http://forums.slimdevices.com/showth...onization-work
        Louis
        Last.fm

        Comment

        • cadfish
          Member
          • Nov 2012
          • 78

          #5
          Thanks a lot for the fast response ..

          Very interesting - appaerently I was to lazy to find it myself ...

          I am aware of NTP but somehow had the idea, that this would not be accurate enough. I thought this is just for syncing usual "clocks" with an accuracy of at much sub-second level, which would not be good enough for synced audio playback. I'm surprised that NTP is accurate on ms level.

          But from the thread you pointed me at, I learned, that my "approach" is conceptionally not so far, from how it really works

          Thanks
          Primary System: LMS on Win 7 PC, 4 SBT, 1 Duet, 2 piCorePlayer (HifiMeDIY Sabre II DAC & HifiBerry DAC), 2 Duet Controller, 2 iPods, 1 iPhone (iPeng), Sony XPeria Mini & ION, Android Tablet (SqueezeControl, OrangeSqueeze, SqueezeCommander) -- Secondary System: Mobile Server based on SqueezePlug on RaspBerry PI

          Visit SBNetIO - yet another remote control plugin.

          Comment

          • bpa
            Senior Member
            • Oct 2005
            • 22876

            #6
            Originally posted by cadfish
            I am aware of NTP but somehow had the idea, that this would not be accurate enough. I thought this is just for syncing usual "clocks" with an accuracy of at much sub-second level, which would not be good enough for synced audio playback. I'm surprised that NTP is accurate on ms level.
            IIRC the hardware players have v. accurate clock and the sync protocol is more interested in comparing the differences in elapsed time (i.e. not current time) as measured by each player. One of the problem with software players on PC is that the PC clock was often not very accurate and so PC based softplayers often didn't sync very well.

            It is very interesting to see what is actually happening when players are in sycn by enabling player.sync logging to INFO or DEBUG and see how the server and player adjust. Add in a softplayer such as SoftSqueeze (which I think doesn't have the latest sync protocol features) on a PC to see the larger adjustments being made.

            Comment

            • bluegroper
              Member
              • Mar 2006
              • 62

              #7
              Originally posted by cadfish
              How does the synchronisation of players work ?
              It works REALLY nicely. :-)
              Server: Intel Core i5-2400, >24,000 bogomips, 16GB RAM, Linux 4.18.x
              Players: 2 x SB3's, SB-Receiver, SB-Controller, SB-Boom
              Amplification: NAD C720BEE, NAD 7130 Receiver
              Loudspeakers: Krix Lyrix Gold (Sadly, no longer in production)

              Comment

              Working...