[pulseaudio-tickets] [Bug 40290] New: Vala Bindings cause errors

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Aug 22 09:16:12 PDT 2011


https://bugs.freedesktop.org/show_bug.cgi?id=40290

           Summary: Vala Bindings cause errors
           Product: PulseAudio
           Version: unspecified
          Platform: x86 (IA32)
        OS/Version: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: misc
        AssignedTo: pulseaudio-bugs at lists.freedesktop.org
        ReportedBy: bwcode4u at gmail.com
         QAContact: pulseaudio-bugs at lists.freedesktop.org
                CC: lennart at poettering.net


I reported this through Vala list and was told it was due to bindings.

I ran into a couple of issues regarding structs.  

1. When using a struct an error is raised in the c code when attempting to
access the "built-in" to_string() method for an element.

                 Context.State state = ctx.get_state();
                 print (state.to_string());

/.../Source/vala/pulse-device-chooser/src/main.c:160:47: error:
‘PA_CONTEXT_TYPE_STATE’ undeclared (first use in this function)

2. What is the correct method to copy a struct?  Attempting to copy
struct by assignment to variable, or Memory.copy causes "undefined
reference to `pulse_audio_sink_info_copy'" errors in c code.

where i & si are type PulseAudio.SinkInfo

               context.get_sink_info_by_index (index, (context, i, eol) => {
                       Memory.copy(&i, &si, sizeof(SinkInfo));
                       si = i;
               });



3. Attempting to box struct from pkg in an ArrayList causes an error
in c code similar to question 1.
Gee.ArrayList<SinkInfo?> sink_info = new Gee.ArrayList<SinkInfo?>();

main.c:643:31: error: ‘PULSE_AUDIO_TYPE_SINK_INFO’ undeclared (first
use in this function)


See attachment for complete output.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the pulseaudio-bugs mailing list