[Gambas-user] A "Callback" function doesn't work.

Ru Vuott vuott at ...325...
Wed Jul 17 19:45:32 CEST 2013


Hello Jussi,


> I think this is correct way to call
> jack_client_open, since "status" is
> declared in c code.
> Though status is enum word, not short...
> 
> Dim status As Short
> 
> client = jack_client_open(nomeClient, options,
> VarPtr(status), Null)
 
I tried in this way, but I obtain the same error 11.
 
 

> Compile piece of c code:
> 
> #include <jack/jack.h>
> 
> jack_default_audio_sample_t test;
> 
> printf ("%d\n", sizeof(test));
> 
> Documentation says it can be float or double (in Gambas
> single and float).
> http://jackaudio.org/files/docs/html/types_8h.html#ae42bb7c4f7929176563585b2e3e8ebf6
 
Well, I compiled those C lines in this way:

******

#include <stdio.h>
#include <stdlib.h>
#include <jack/jack.h>

void main () {
jack_default_audio_sample_t test;

printf ("%d\n", sizeof(test));

}

*****

In terminal I received this notice:
"warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat]"

However... the relative compiled program was created, and launched in Terminal I obtained this value:   4   


Bye
vuott




More information about the User mailing list