Re: [Vala] Manual VAPI writing
- From: Harry Van Haaren <harryhaaren gmail com>
- To: Julian Andres Klode <jak debian org>
- Cc: vala-list gnome org
- Subject: Re: [Vala] Manual VAPI writing
- Date: Wed, 30 Jun 2010 00:38:39 +0100
Any pointers as to how to do this? Cheers, -Harry
Use cprefix="" - maybe you also need to set cname="int" in order to have
Vala know what to call the type of the values.
Yes! Thanks, that worked a charm.
Next stumbling block found:
when opening a file, sf_open(...) is called. To close the file,
sf_close(file) must be called.
[CCode (cheader_filename="sndfile.h",cname ="SNDFILE")]
class Sndfile
{
[CCode (cname="sf_open", free_function="sf_close")]
public Sndfile(string path, FileMode mode, out Info sf_info );
}
Doesnt seem to work...? The C output is totally off, ie:
// at top of file:
#define _sndfile_unref0(var) ((var == NULL) ? NULL : (var = (sndfile_unref
(var), NULL)))
// where file.close() is called:
_sndfile_unref0 (file);
I think it must be something in the .vapi, because that C looks totally
unrelated to:
sf_close(file);
;-) Getting steadily closer... I can print values of the sample loaded from
HD already... sound will be coming soon!
-Harry
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]