[alsa-devel] incoming sequencer event timestamping (via a running queue): how?
clemens at ladisch.de
Tue Apr 12 07:49:26 CEST 2011
> On Mon, Apr 11, 2011 at 2:01 PM, R. Dresens <chromisx at 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
Alternatively, you can get timestamps on events that arrive at a port:
More information about the Alsa-devel