Re: Set tick state in seq ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ah I think I get it now -- snd_seq_ev_set_queue_pos_tick is a macro which constructs a special event type, it's not a function on the queue.   So I have to construct of these events then pass it to the timer at 0:0 ?

$aconnect -i
client 0: 'System' [type=kernel]
    0 'Timer           '

I'd still like to understand the ideas behind the architecture here though -- why do we have  snd_seq_queue_tempo_set_tempo as a direct function on the queue to change tempo, but we have to send this event to a port to change position ?





On Mon, Apr 4, 2016 at 10:11 AM, Charles Fox <charles.fox@xxxxxxxxx> wrote:
Thanks very much Clemens.

I saw this function in the API, but from from the name and signature, snd_seq_ev_set_queue_pos_tick(ev,q,ttime), I thought it was a method for a single event rather for the whole queue.   Could you explain what the ev argument is for and what I need to put in it; and also why its called snd_seq_ev_set_queue_pos_tick rather than snd_seq_queue_set_pos_tick ?

(I can see in the API docs this text, which I think tells what I need to put in ev, but I don't understand why this is needed, why's it not just snd_seq_queue_set_pos_tick(q,ttime) ?
(ev)->data.queue.queue = (q),\
(ev)->data.queue.param.time.tick = (ttime))

)

thanks




charles











On Mon, Apr 4, 2016 at 9:12 AM, Clemens Ladisch <cladisch@xxxxxxxxxxxxxx> wrote:
Charles Fox wrote:
> The midiarp.c demo in the tutorial shows how to read the tick state,
> and how to get and set the tempo.   So I was expecting to find
> a function called something like  snd_seq_queue_set_tick , but there
> doesn't seem to be one in the API.

To set a queue's timer's position, send a message SND_SEQ_EVENT_SETPOS_TICK
and/or SND_SEQ_EVENT_SETPOS_TIME to the global timer port.

There are macros snd_seq_ev_set_queue_pos_tick() and
snd_seq_ev_set_queue_pos_real() to help you construct such messages.


Regards,
Clemens





--
Dr Charles Fox
Director, Ibex Automation Ltd, www.ibexautomation.co.uk
Academic Fellow, University of Leeds
------------------------------------------------------------------------------
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux