From: Clemens Ladisch <clemens@ladisch.de>
To: "R. Dresens" <chromisx@nedlinux.nl>,
r10kindsofpeople <r10kindsofpeople@gmail.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: incoming sequencer event timestamping (via a running queue): how?
Date: Tue, 12 Apr 2011 07:49:26 +0200 [thread overview]
Message-ID: <4DA3E7E6.7070801@ladisch.de> (raw)
In-Reply-To: <BANLkTik1bFCEwMDw2cgxvLLEFkkyBXkPFQ@mail.gmail.com>
r10kindsofpeople wrote:
> On Mon, Apr 11, 2011 at 2:01 PM, R. Dresens <chromisx@nedlinux.nl> wrote:
> > At this moment, I just sample the tick value manually when I get an
> > event. That kinda works, but chances are high that the kernel
> > sequencer system can do that for me with more accuracy?
>
> In your function that does the connection to the reception port...
> snd_seq_port_subscribe_set_queue(subs, queue_id); //<< queue_id being the one you allocated
> snd_seq_port_subscribe_set_time_update(subs, 1);
> snd_seq_subscribe_port(pSeq, subs);
This is the correct way to get timestamps on events that go through
a subscription.
Alternatively, you can get timestamps on events that arrive at a port:
snd_seq_port_info_set_timestamping(pinfo, 1);
snd_seq_port_info_set_timestamp_queue(pinfo, queue);
snd_seq_create_port(pSeq, pinfo);
Regards,
Clemens
next prev parent reply other threads:[~2011-04-12 5:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-11 18:01 incoming sequencer event timestamping (via a running queue): how? R. Dresens
2011-04-11 20:10 ` r10kindsofpeople
2011-04-12 5:49 ` Clemens Ladisch [this message]
2011-04-12 7:05 ` R. Dresens
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=4DA3E7E6.7070801@ladisch.de \
--to=clemens@ladisch.de \
--cc=alsa-devel@alsa-project.org \
--cc=chromisx@nedlinux.nl \
--cc=r10kindsofpeople@gmail.com \
/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.