From: Stefan Westerfeld To: Carsten Kroll Subject: Re: SGI libaudio interface for arts Hi Carsten! On Fri, Aug 17, 2001 at 10:53:37PM -0400, Carsten Kroll wrote: > I just compiled KDE on my O2 (IRIX 6.3) and I needed some audio. So I made > some modifications and wrote an arts I/O module for SGI's libaudio. (It > support full duplex audio). > You can include it in the distribution if you like. There is no autoconf > support yet. The compile switch HAVE_IRIX is hard coded in the .cc files. I am currently having some holidays, but I'll be back in a few days. I think its great you wrote this code, and I definitely would like to include it in the KDE CVS, so that newer versions (3.0) will run on SGI out-of-the-box. Here are the few issues I saw while looking at the code briefly for the first time, that probably need to be adressed before inclusion: - I can't include patches which simply remove the math.h include. Is there another way? Whats the problem with it? - If you can do it, I would be happy if you wrote a configure test, so that the code compiles correctly "out-of-the-box" - I am not terribly happy with selectFD1 - would it be possible to have a proper distinction between the-fd-you-select-on-for-reading and the-fd- you-select-on-for-writing? So that we can save the ifdef in the non- driver specific part? - I think newer versions of convert.cc have i16be conversion routines, so you can use those (but that shouldn't be an issue anyway, I'll see that while merging) - It would be great if you could format the code in a way that it displays properly with four-spaces-tabs (all aRts code is indented that way). Feel free to ignore comments that don't fit though, I just read it once ;). Cu... Stefan -- -* Stefan Westerfeld, stefan@space.twc.de (PGP!), Hamburg/Germany KDE Developer, project infos at http://space.twc.de/~stefan/kde *- From: Carsten Kroll To: Stefan Westerfeld Hi Stefan, First of all thanks for your quick reply. Please see my answers below. I will send you a cleaned up version when I'm done with it. Carsten Stefan Westerfeld wrote: > Hi Carsten! > > On Fri, Aug 17, 2001 at 10:53:37PM -0400, Carsten Kroll wrote: > > I just compiled KDE on my O2 (IRIX 6.3) and I needed some audio. So I made > > some modifications and wrote an arts I/O module for SGI's libaudio. (It > > support full duplex audio). > > You can include it in the distribution if you like. There is no autoconf > > support yet. The compile switch HAVE_IRIX is hard coded in the .cc files. > > I am currently having some holidays, but I'll be back in a few days. I think > its great you wrote this code, and I definitely would like to include it > in the KDE CVS, so that newer versions (3.0) will run on SGI out-of-the-box. > > Here are the few issues I saw while looking at the code briefly for the first > time, that probably need to be adressed before inclusion: > > - I can't include patches which simply remove the math.h include. Is there > another way? Whats the problem with it? The problem with the math.h on my machine is that it defines a structure called exception which conflicts with one of egcs header. This might be not a problem on newer machines, but frankly I don't know. This change was done before I looked at the SGI math.h and I found out that I could simply rename the exception structure to math_exception. !!! So please ignore those changes. !!! > > - If you can do it, I would be happy if you wrote a configure test, so that > the code compiles correctly "out-of-the-box" All right. I will send it to you. > > - I am not terribly happy with selectFD1 - would it be possible to have a > proper distinction between the-fd-you-select-on-for-reading and the-fd- > you-select-on-for-writing? So that we can save the ifdef in the non- > driver specific part? the ifdefs in the higher level parts are not really necessary. I put them in for two reasons a) to mark the places of my modifications and b) to not accidentally break the existing code. I thought of the SelectFD1 more like a higher level concept where you can can have separate devices for read and write operations (that's how the libaudio stuff works). Another useful application for this would be if you have two half duplex sound boards. One could use the first card for input and the second one for output. SelectFD1 is the-fd-you-select-on-for-reading but currently only for the SGI driver. If you want to adapt this concept all currently existing low level drivers need to support this. Shouldn't be too hard I guess. There is only one exception and this is the except-fd-set, libaudio does not like this at all. The only way of avoiding the ifdef in this case would be to somehow detect the driver and if it's the SGI one then just don't use it. > > - I think newer versions of convert.cc have i16be conversion routines, so > you can use those (but that shouldn't be an issue anyway, I'll see that > while merging) Thought so, just installed 2.2 on my intel box. You guys are way to fast, it took me weeks to compile KDE on IRIX ;). > > - It would be great if you could format the code in a way that it displays > properly with four-spaces-tabs (all aRts code is indented that way). > > Feel free to ignore comments that don't fit though, I just read it once ;). > > Cu... Stefan > -- > -* Stefan Westerfeld, stefan@space.twc.de (PGP!), Hamburg/Germany > KDE Developer, project infos at http://space.twc.de/~stefan/kde *-