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 Minisini <gam...@users.sourceforge.net> ha scritto: > Da: Benoît Minisini <gam...@users.sourceforge.net> > Oggetto: Re: [Gambas-user] Release of Gambas 3 RC3. But I have a dream.... BIS > A: "mailing list for gambas users" <gambas-user@lists.sourceforge.net> > Data: Domenica 18 settembre 2011, 23:24 > > Hello, > > > > about your new suggestion: > > > > 1) like I said, now I can open the fd in: > /proc/self/fd/ > > > > e.g.: hFile = Open "/proc/self/fd/20" For read watch > > > > some fd (like 3,4,5,6, 16 and 20) gives data, others > not. > > > > So, I don't understand what's the use of the trick. > > > > 2) how have I to use it ? maybe: > > > > hFile = Open "/proc/self/fd/.1" For read watch > > > > 3) I use Gambas 3, where can I download the revision > #4134 ? > > > > Thanks > > Paolo > > > > > > P.S.: Benoît ! Is not it better if you add that > possibility to personalize > > the message loop ??? > > > > Forget the "/proc/self/fd" thing. The new solution is the > best I found without > breaking compatibility. Maybe there will be another > solution after Gambas 3. > > I suggest you read the "subversion howto" on gambasdoc.org > to learn how to use > subversion to get the latest development release. > > You ask how to use it. Did you read my mail? there is an > example in it. For > watching the file, just add the WATCH keyword. So: > > Dim iAlsaFileDescriptor As Integer > Dim hFile As File > > hFile = Open "." & > CStr(iAlsaFileDescriptor) For Read Watch > > ... > > Sub File_Read() > ' Get the data > received through hFile > End > > To stop the watching, just close "hFile". The original ALSA > file descriptor > will not be closed. > > Regards, > > -- > Benoît Minisini > > ------------------------------------------------------------------------------ > BlackBerry® DevCon Americas, Oct. 18-20, San > Francisco, CA > http://p.sf.net/sfu/rim-devcon-copy2 > _______________________________________________ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user