[PATCH] vala: Add bindings for libpulse-simple

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Fri, 2012-07-27 at 09:45 +0300, Tanu Kaskinen wrote:
> Fully agree with this.

Great!

> Is this a widely used convention in the Vala world? To me the "default"
> parameters that however can't be used as real default parameters seem
> strange and confusing. The programmer should read the full documentation
> for the function anyway, so the benefit for these hints seem
> questionable to me.

That logic seems reasonable to me. Now, AFAICT this problem only affects
the constructor, all the other methods only have "real" default
parameters. The only solution besides simply removing these "unreal"
default parameters is adding default values for the parameters in
between (dir, stream_name, ss).

I've attached a new version of the bindings which does precisely that. I
chose PLAYBACK for the stream direction and a CD-like sample format (the
only difference is that it uses native endian-ness) as I think that
these should be the most common values.

This effect is that you can now simply create a new connection by using
"new Simple()" and immediately start playback using an int16[] array.
This specific sample format should also avoid any re-sampling inside PA.

What do you think?

Best regards

Alexander Kurtz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libpulse-simple.vapi
Type: text/x-vala
Size: 1582 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20120730/6447d710/attachment-0001.bin>
-------------- next part --------------
libpulse
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20120730/6447d710/attachment-0001.pgp>


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux