[Pkg-alsa-devel] Bug#631865: patch

Jean-Michel Vourgère jmv_deb at nirgal.com
Wed Feb 15 22:00:45 UTC 2012


When I changed the output message to:
       fprintf(stderr, "%s!!! (at least %.3f ms long)\n%ld %ld %ld %ld\n",
            stream == SND_PCM_STREAM_PLAYBACK ? _("underrun") : _("overrun"),
            diff.tv_sec * 1000 + diff.tv_nsec / 1000000.0,
            now.tv_sec, now.tv_nsec,
            tstamp.tv_sec, tstamp.tv_nsec);

I get
underrun!!! (at least -2060492640.061 ms long)
135594 763755290 1329340981 867816000
underrun!!! (at least -2060492647.179 ms long)
135594 856280045 1329340981 967459000
underrun!!! (at least -2060492639.984 ms long)
135594 955783710 1329340982 59768000

I have monotonic = 1 here.

We can see the 2 clocks are totally out of sync.

Why are we using clock_gettime(CLOCK_MONOTONIC, &now) while we have a nice
snd_pcm_status_get_htstamp function?

Attached is a patch. 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arecord_underrun_message.patch
Type: text/x-patch
Size: 2755 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-alsa-devel/attachments/20120215/aece2cd9/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.alioth.debian.org/pipermail/pkg-alsa-devel/attachments/20120215/aece2cd9/attachment.pgp>


More information about the Pkg-alsa-devel mailing list