On Tue, 14 Oct 2003, Ryan Pavlik wrote:

> On Tue, 14 Oct 2003 20:06:00 -0500
> Ryan Underwood <[EMAIL PROTECTED]> wrote:
>
> > Silly question, but is 'npfd' the file descriptor you are polling + 1?
>
> I AM DUMB.
>
> I totally overlooked this.  Simple fix, and it works great.
> Thanks. :-)  You'd think I had never done this before.
>
> So the select() version works fine, with the bridge from the poll()
> file structure.  This should integrate with ruby just fine then.

Don't use select() if possible. You don't know which direction is required
for a file descriptor. You must use snd_seq_poll_descriptors_revents()
which mangles the used direction and reports the correct one to
the application (and yes, it might be an opposite or both
directions in real if we implementing some complex devices behind this
API).

                                                Jaroslav

-----
Jaroslav Kysela <[EMAIL PROTECTED]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to