Is this a Pulseaudio bug or a Vala bug? (v2)

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

 



Hi guys,

On Thu, Apr 14, 2011 at 9:36 AM, Colin Guthrie <gmane at colin.guthr.ie> wrote:
> 'Twas brillig, and Alexander Kurtz at 14/04/11 13:52 did gyre and gimble:
>> What do you think? Does the current upstream libpulse.vapi file really
>> work for you w/o modifications?
>
> No I seem to get this error too. I'm sure I did test the previous fix,
> but perhaps not :s

I think something either changed in Vala or in PulseAudio. When I
tested the previous fix against the Vala shipped in Ubuntu 10.10,
everything was working fine -- no build-time errors. But I get the
same error message as Alexander when I try with pulseaudio git master
+ Fedora 15's Vala (a much newer version).

It's puzzling that you can't conveniently "bind" a constant from C
into Vala. I guess the only way to do it would be to declare an inline
function that just returns the value you want -- but this would bump
the libpulse API by adding a bunch of new functions (one for each
constant we want to export). There's got to be a cleaner way to simply
reach into libpulse and grab the constant, since you can do that if
you're writing C and Vala compiles to C. Of course, if it's a #define
instead of an actual variable, that's another issue entirely, since
#defines have no linkage and no symbol -- they are basically invisible
to Vala. Plus you don't get type safety at all.

Now about the fix, I still don't know why my compile worked before
with only my patch, but it seems that Alexander's additional patch is
complimentary and will further help the bindings along.

That said, what would __really__ help the bindings along would be to
write the libpulse API in a way that either vapigen or
gobject-introspection could easily parse the whole thing with minimal
human intervention. Vala's got the tools to do this, and they work,
but not so much with "plain C" type APIs as we have in libpulse.

Maybe a libpulse-glib or libpulse-gobject wrapper is in order? I
dunno. We seem to be getting _a lot_ of niggling issues with the Vala
bindings, and it'll always be a moving target as Vala changes (and to
a lesser extent these days, as PA changes).

So +1 for committing Alex's patch.

HTH,

Sean


>
> I guess you're additional patch with the 32 is needed, but I'll wait for
> Sean to confirm his thoughts.
>
> Col
>
> --
>
> Colin Guthrie
> gmane(at)colin.guthr.ie
> http://colin.guthr.ie/
>
> Day Job:
> ?Tribalogic Limited [http://www.tribalogic.net/]
> Open Source:
> ?Mageia Contributor [http://www.mageia.org/]
> ?PulseAudio Hacker [http://www.pulseaudio.org/]
> ?Trac Hacker [http://trac.edgewall.org/]
>
> _______________________________________________
> pulseaudio-discuss mailing list
> pulseaudio-discuss at mail.0pointer.de
> https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
>



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

  Powered by Linux