[alsa-devel] incoming sequencer event timestamping (via a running queue): how?

R. Dresens chromisx at nedlinux.nl
Tue Apr 12 09:05:25 CEST 2011

On Tue, 12 Apr 2011 07:49:26 +0200
Clemens Ladisch <clemens at ladisch.de> wrote:

> r10kindsofpeople wrote:

> > In your function that does the connection to the reception port...
> > snd_seq_port_subscribe_set_queue(subs, queue_id);  //<< queue_id..
> > 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);


I have both solutions working now,

Setting the port_info seems (to me) the easiest solution,

Working with port subscriptions was a nice exercize though... ;)




More information about the Alsa-devel mailing list