[alsa-devel] VOIP xrun problem

Clemens Ladisch clemens at ladisch.de
Tue Oct 23 17:10:06 CEST 2012

Jamey Drennan wrote:
> On Tue, Oct 23, 2012 at 2:35 AM, Clemens Ladisch <clemens at ladisch.de> wrote:
>> So the RTP stream is synchronized to the sender's clock.
>> How do you handle the differences between the stream's clock and
>> the playback device's clock?
> The client and server negotiate the connection parameters including packet
> interval, size, audio format, and rate.  The rtp library ensures that the
> packets arrive on time and accounts for initial time differences.  Maybe
> the timestamps of the stream packets aren't enough to keep the two clocks
> synchronized(or a frame is the same regardless if the two devices are set
> up the same)?

The sender's and receiver's clocks are determined by the crystals
soldered onto their sound cards.  You can try to configure them for
the same nominal sample rate, but you cannot avoid that they run fast
or slow relative to each other by some fraction of a percent.

> In testing, the two clocks are one and the same since I am
> running the client and server on the same device.

So the problem shows up even when testing?


More information about the Alsa-devel mailing list