[Gambas-user] A "Callback" function doesn't work.
Jussi Lahtinen
jussi.lahtinen at ...626...
Sun Jul 14 16:41:22 CEST 2013
Not sure this is thread issue, and anyway if it's the problem I think jackd
doesn't have to be ran as realtime thread (but
maybe you need it that way?).
I don't think these are equal: "Private client As Pointer" and
"jack_client_t *client;".
Gambas code "Something As Pointer" creates void pointer without any
allocation,
but C code "jack_client_t *client;" creates pointer and allocation for the
structure.
So you need to find out size of the structure and make the allocation in
Gambas before using it.
http://gambasdoc.org/help/lang/alloc
Unless the library takes care of the allocation... not sure.
Also you didn't mention how your code fails. I would expect SGN11.
Jussi
On Tue, Jul 9, 2013 at 4:45 PM, Ru Vuott <vuott at ...325...> wrote:
> Thank you, Tobias.
>
> If it is just so, it's a pity.
>
> Regards
> vuottt
>
>
> --------------------------------------------
> Lun 8/7/13, Tobias Boege <taboege at ...626...> ha scritto:
>
> Oggetto: Re: [Gambas-user] A "Callback" function doesn't work.
> A: "mailing list for gambas users" <gambas-user at lists.sourceforge.net>
> Data: Lunedì 8 luglio 2013, 20:08
>
> On Mon, 08 Jul 2013, Ru Vuott wrote:
> > Hello,
> >
> > I'm trying to transpose the short C code of the
> application: "simple_client" based on Jack API, which you
> can see here:
> >
> >
> https://github.com/jackaudio/example-clients/blob/master/simple_client.c
> >
> > This small Jack application uses a function "callback"
> in the code called "process", which I tried to call in
> Gambas adhering to the instructions - about the "callbacks"
> - contained in the official documentation relating to
> external functions.
> >
> > I do not understand really why the "backcall" function
> in my Gambas transposition does not works.
> > So I'ld like to ask for your help for a checking,
> so that we can understand the real problem.
> >
> > I attach the source code of my Gambas transposition.
> >
> > (Application needs Jack is running)
> >
> > Thanks... a lot !
>
> Sorry, I don't know the least what this project is about but
> the comment in
> the C sources state that the callback is executed in a
> "special realtime
> thread". This is the same problem as here[0], I suspect.
>
> Regards,
> Tobi
>
> [0] http://sourceforge.net/mailarchive/message.php?msg_id=30895071
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
>
> ------------------------------------------------------------------------------
> See everything from the browser to the database with AppDynamics
> Get end-to-end visibility with application monitoring from AppDynamics
> Isolate bottlenecks and diagnose root cause in seconds.
> Start your free trial of AppDynamics Pro today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
More information about the User
mailing list