Hello list,

I need some advice on the ALSA sequencer interface. In particular I'd
like to know if the following code can be safely used inside a real-time
audio thread, i.e. is it guaranteed not to block ?

As far as I've been able to find out, it should be safe.

snd_seq_event_t *E;

if (snd_seq_event_input_pending (midi_seqh, 1))
{
    do
    {
        snd_seq_event_input (midi_seqh, &E);
        // handle event E
    }
    while (snd_seq_event_input_pending (midi_seqh, 0));
}


-- 
Fons


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Alsa-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-user

Reply via email to