> > 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
_______________________________________________ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list