All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Courtier-Dutton <James@superbug.demon.co.uk>
To: "Måns Rullgård" <mru@kth.se>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: Re: Audio and Video sync. Getting Timestamps
Date: Fri, 07 May 2004 11:52:11 +0000	[thread overview]
Message-ID: <409B786B.3050607@superbug.demon.co.uk> (raw)
In-Reply-To: <yw1xk6zoen8d.fsf@kth.se>

Måns Rullgård wrote:
> James Courtier-Dutton <James@superbug.demon.co.uk> writes:
<snip>

> 
> The OP was recording.
> 

Oops. My explanation only covers playback, not capture.
But if you use the snd_pcm_avail_update() just before you capture some 
samples from the buffer, then do a gettimeofday(), you will get an 
accurate measure of when the samples arrived in the buffer.
If you also use a thread and get it to do poll(), you could also keep 
the latency down, with it calling the routine on each period elapsed.

Summary: Use a method similar to the playback method, but just modify it 
a be for record.

Cheers
James


-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3

      reply	other threads:[~2004-05-07 11:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-05  9:13 Audio and Video sync. Getting Timestamps granda
2004-05-05  9:38 ` Takashi Iwai
2004-05-05  9:39   ` Jaroslav Kysela
2004-05-06 23:32   ` Juan Carlos Granda
2004-05-07  0:02     ` James Courtier-Dutton
2004-05-07  6:59       ` Måns Rullgård
2004-05-07 11:52         ` James Courtier-Dutton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=409B786B.3050607@superbug.demon.co.uk \
    --to=james@superbug.demon.co.uk \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=mru@kth.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.