Unix FD Passing

Marcel Holtmann marcel at holtmann.org
Mon May 4 12:34:54 PDT 2009


Hi Lennart,

> > > On Mon, 04.05.09 16:53, Alp Toker (alp at atoker.com) wrote:
> > > > Thanks for paying attention to this. ndesk-dbus is actively using 'f'
> > > > for 32 bit single precision floating point values and dbus-java and
> > > > dbus-python support it as well now to some extent too I believe.
> > > 
> > > Uh. Could you please post this upstream to the spec, then? If it's
> > > that well accepted then this should really be added to the spec!
> > 
> > FYI, the extent of float32 support in dbus-python is that the C part contains
> > #ifdef'd code for it at Alp's urging; it should work, but has never been
> > compiled, let alone tested. So, don't consider me to be part of the float32
> > implementor cabal :-)
> > 
> > I seem to remember someone benchmarked sending messages with arrays of 32- and
> > 64-bit floats and was unable to find a performance difference, but I can't
> > find a URL.
> 
> Oh, I absolutely believe in the validity of having float32 in the
> spec. In fact coming from an audio background I can say that float32
> is one of the most often used types for audio samples and for good
> reasons. 32bit floats already give about 10bit of headroom beyond the
> theoretic limits of DACs (in the real world even more) Using 64bit fp
> samples hence has only minimal (if not none) benefits at the price of
> doubling the memory usage/bandwith requirements. Now D-Bus isn't a
> particularly good choice for exchanging larger amounts of sample data
> right now, but that doesn't change the fact that float32 is very
> useful to have and very natural for all things audio.
> 
> It's not that I picked 'f' for the unix fd type because I thought
> having float32 in D-Bus was a bad idea. I did it because I wasn't aware
> that there was actual code using that type right now and because all
> other letters that came to my mind were already taken (u, d, ...).

if you are looking for a new character, then just us 'z' :)

In theory you could use something like '@' if you really want to
preserve the alphabet namespace for generic types.

Regards

Marcel




More information about the dbus mailing list