synchronizing audio over a network

前端 未结 5 608
执念已碎
执念已碎 2021-01-29 23:01

I\'m in startup of designing a client/server audio system which can stream audio arbitrarily over a network. One central server pumps out an audio stream and x number of clients

5条回答
  •  星月不相逢
    2021-01-29 23:38

    Ryan Barrett wrote up his findings on his blog.

    His solution involved using NTP as a method to keep all the clocks in-sync:

    Seriously, though, there's only one trick to p4sync, and that is how it uses NTP. One host acts as the p4sync server. The other p4sync clients synchronize their system clocks to the server's clock, using SNTP. When the server starts playing a song, it records the time, to the millisecond. The clients then retrieve that timestamp, calculate the difference between current time from that timestamp, and seek forward that far into the song.

提交回复
热议问题