On Monday 17 December 2001 23.59, you wrote:
> Btw. OSS follows the original unix idea and POSIX rule of "everything is a
> file" very well. It works with open()/read()/write()/close() as the other
> devices do. And it's controlled via ioctl() as it should.

In my pet software BruteFIR I used to do this (yes ALSA 0.9 supports this way 
of operation too). Then I wanted to read and write audio to a 26 channel 
sound card, and suddenly using reads and writes on file descriptors wasn't 
feasible anymore. Changing to using native ALSA calls for audio data transfer 
was simple, and I could still use the file descriptors in my select calls.

In ALSA you can actually have both worlds. And although I also have found it 
a bit annoying that the ALSA 0.9 API has been changing over the development 
time (I had to use ALSA 0.6/0.9 since 0.5 and OSS doesn't support enough 
features for my software), I have full understanding for it. It is a 
development API, and that must be allowed to improve. What the ALSA team has 
done is simply to use the power of open source in their standardisation, they 
released early and thus have got feedback from other developers using the API 
early on. I think this has helped to make the API better, which now has been 
reasonable stable for quite a long time. ALSA is the most powerful sound card 
API I have seen, and I am glad that it is.

> Windows is good example of total API mess where there is different API for
> all the different twinkles, different error codes, etc. And I think it as
> Bad Thing(tm). It's platform where you have to write two hundred lines of
> code, call fifty functions and fill twenty large structures just to get
> single sample out of soundcard and then the thing goes *boom*...

The problem with ALSA now as I see it is the lack of documentation. If you 
want to do simple things, it is simple, but it is relatively hard to find out 
how to do it anyway. Doing complex things is always complex to do. I don't 
think it is bad that ALSA allows complex things to be done, even though it 
means that there will be lots of more functions and structures in the API. 
You don't need to use them for the simple things anyway.

/Anders

Reply via email to