[Gambas-user] Gambas + Midi + ALSA + file descriptors
Benoît Minisini
gambas at ...1...
Mon Sep 26 13:19:13 CEST 2011
> Hello Benoît,
>
> I would just like to add that trying your trick ( hFile = Open "." &
> CStr(iAlsaFileDescriptor) For xxx Watch) besides the problem about CPU
> over-working (at 100%), wich I have already told, there is also a strange
> thing: as you see in the source (wich I sent you in my previous e-mail),
> despite the line uses "write": hFile = Open "." &
> CStr(iAlsaFileDescriptor) For WRITE Watch
>
> (So, for fd passed by Alsa that line works.)
>
> the called routine "wants" "Read": Public Sub File_Read().
> If I use " sub File_Write() ", it doesn't work !
>
> Thanks
> Paolo
>
By using:
snd_seq_poll_descriptors(handle, pfds, npfds, POLLIN)
You are asking for ALSA file descriptors used for reading data, not for
writing. So all that behaviour is expected!
Maybe if you put POLLOUT instead, things will behave better.
See the ALSA documentation:
http://www.alsa-project.org/alsa-doc/alsa-
lib/group___sequencer.html#g5086fbf4e38449108a0807fb5cf5e9c6
Regards,
--
Benoît Minisini
More information about the User
mailing list