* HELP! seq - writing to q in realtime mode
@ 2004-05-12 10:08 David McNab
2004-05-12 15:55 ` Clemens Ladisch
0 siblings, 1 reply; 2+ messages in thread
From: David McNab @ 2004-05-12 10:08 UTC (permalink / raw)
To: alsa-devel
(apologies if you've received this twice)
Hi,
I'm experienced in C, but am a total beginner to alsa seq api (only been
coding to it for a week), and desperately need some help. I'm going
crazy here!
I'm trying to create and schedule outbound events, in realtime absolute
mode.
When sending these events directly, using SND_SEQ_QUEUE_DIRECT, the
events get delivered fine to subscribers.
But when adding realtime absolute timestamps, and marking the event to a
queue I've created, only the very first event (time=0) gets sent.
I've struggled for days with the doco, reading example code etc, but am
having no success. There are no simple examples that cover my situation.
Can someone please give an overview (or preferably sample code)
explaining what I need to do to transmit events in realtime absolute mode?
For instance, do I need to set up timers on the queue?
What obscure function calls do I need to make, from the first
snd_seq_alloc_queue() call, to the actual snd_seq_event_output_direct()
calls sending the individual midi events?
What are the little details - obvious to you experts, but not obvious to
hackers new to the ALSA APIs?
I really need help here - I'm tearing my hair out in frustration, and am
brain-fried from wading through the thousands of different api functions
and macros, and hampered by the lack of detailed doco and tutorial
examples (the miniArp example doesn't help, because it's tick-based).
Thanks profusely in advance for your help
Kind regards
David
PS - ALSA is really great software. The APIs are very comprehensive. But
IMO ALSA could really benefit from the addition of an
ultra-stupid-simple-dumbed-down API which covers most basic scenarios,
doesn't confuse the newer programmer with 5,347 different function calls
and data types, and doesn't require weeks of learning.
--
Kind regards
David
--
leave this line intact so your email gets through my junk mail filter
-------------------------------------------------------
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: HELP! seq - writing to q in realtime mode
2004-05-12 10:08 HELP! seq - writing to q in realtime mode David McNab
@ 2004-05-12 15:55 ` Clemens Ladisch
0 siblings, 0 replies; 2+ messages in thread
From: Clemens Ladisch @ 2004-05-12 15:55 UTC (permalink / raw)
To: David McNab; +Cc: alsa-devel
David McNab wrote:
> I'm trying to create and schedule outbound events, in realtime absolute
> mode.
>
> When sending these events directly, using SND_SEQ_QUEUE_DIRECT, the
> events get delivered fine to subscribers.
>
> But when adding realtime absolute timestamps, and marking the event to a
> queue I've created, only the very first event (time=0) gets sent.
Is the queue running? (see /proc/asound/seq/queues)
> Can someone please give an overview (or preferably sample code)
> explaining what I need to do to transmit events in realtime absolute mode?
See the aplaymidi example, which transmits events with relative tick
timestamps. Set the appropriate bits in ev.flags
(SND_SEQ_TIME_STAMP_REAL and SND_SEQ_TIME_MODE_ABS) and use
ev.time.time.tv_sec and .tv_nsec instead of ev.time.tick. (The
snd_seq_ev_schedule_real macro just sets these fields, too.)
> For instance, do I need to set up timers on the queue?
No, queues have a default timer.
HTH
Clemens
-------------------------------------------------------
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-05-12 15:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-12 10:08 HELP! seq - writing to q in realtime mode David McNab
2004-05-12 15:55 ` Clemens Ladisch
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.