[alsa-devel] ALSA C++ API

Rene Herman rene.herman at gmail.com
Wed Sep 19 14:52:15 CEST 2007


On 09/19/2007 02:16 PM, Takashi Iwai wrote:

> At Wed, 19 Sep 2007 04:55:22 +0200,
> Rene Herman wrote:
>> On 09/18/2007 10:19 PM, Lasse Kärkkäinen wrote:
>>
>>> Even though I got no replies to my original announcement, here is a new
>>> version that wraps hw and sw params completely, has a macro for checking
>>> ALSA C function return values (throws alsa::error) and uses different
>>> naming style (similar to the C++ standard library). It is better
>>> documented now, too.
>>>
>>> The code is now largely generated with macros, so it isn't very readable 
>>> anymore :/
>> It's C++ -- what's new? :\
> 
> C++ isn't unreadable unless you use template :)

And unless you use function and/or operator overloading, or exceptions, or 
well, any C++ feature really.

I'll admit that by now my C++ is becoming fairly historical (I'm from before 
the namespace thing...) but C++ very much by design has this major "behind 
your back" thing going which often means that it stays readable only as long 
as you don't actually _have_ to read it at any level of detail.

Well -- such is my impression. I did look at what was posted, and it didn't 
look too scary, just header mapping to libasound directly. If (other) C++ 
programmers would confirm this is useful, perhaps something for the main 
ALSA distribution?

Rene.



More information about the Alsa-devel mailing list