On Sun, 18 Aug 2002 14:48:49 +0200
Frank van de Pol <[EMAIL PROTECTED]> wrote:

> 
> 
> 
> On Sun, Aug 18, 2002 at 05:57:40AM -0300, Juan Linietsky wrote:
> > Hi! I wanted to ask, how about forcing
> > an absolute timestamp for _every_ midi event?
> 
> It's not 100% clear to me wat you mean. When using the sequencer api
> you already have a timestamp (either tick/clock) for every event
> scheduled. Midi data captured from eg. the midi input port is
> timestamped upon receive IRQ.

Well, thats what i thought too by watching the code, but I check any
received
event, from any source and all variables are all zero. Instead, alsa
promises to deliver events at the right time, which is fine.. but not
enough!

include/alsa/seq_event.h:row 421
This is the struct of any event I receive when polling the device,
on my sequencer client:

typedef struct snd_seq_event {
[..] which includes...
        snd_seq_timestamp_t time;
[..]
} snd_seq_event_t;

this struct has...

typedef union snd_seq_timestamp {
        snd_seq_tick_time_t tick;       /**< tick-time */
        struct snd_seq_real_time time;  /**< real-time */
} snd_seq_timestamp_t;

To which i wonder.. first, why is this an union? why cant both be
there?

well, anyway.. snd_seq_tick_time_t is an int,
and snd_seq_real_time is:

typedef struct snd_seq_real_time {
        unsigned int tv_sec;            /**< seconds */
        unsigned int tv_nsec;           /**< nanoseconds */
} snd_seq_real_time_t;

This should technically give me info about the absolute time in which
the event has to be played,
basically what i need in order to do a certain amount of offline
processing.
This way, my softsynth wont need extremely low audio latency to play
accurate timing.

But! All this struct is zeroed, _allways_ zeroed, no info is ever
proovided to my sequencer client.
I think this is either a design problem, or a serious bug in the api. 


Juan Linietsky


-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to