Hello,
I'm transporting a C code in Gambas that provides some functions of
"Libvo-aacenc" API.
The peculiar thing is that a "header" file of "Libvo-aacenc" provides functions
"contained in a Structure" !
Here the declaration in "voAudio.h":
typedef struct VO_AUDIO_CODECAPI
{
VO_U32 (VO_API * Init) (VO_HANDLE * phCodec, VO_AUDIO_CODINGTYPE vType,
VO_CODEC_INIT_USERDATA * pUserData );
VO_U32 (VO_API * SetParam) (VO_HANDLE hCodec, VO_S32 uParamID, VO_PTR pData);
...and so on....
}
----------------------------------------------------------------
In the C code those functions are used as follows:
**********
int main(int argc, char *argv[]) {
...
VO_AUDIO_CODECAPI codec_api = { 0 };
...
...
...
codec_api.Init(&handle, VO_AUDIO_CodingAAC, &user_data);
codec_api.SetParam(handle, VO_PID_AAC_ENCPARAM, ¶ms)
....
....
...etc...
}
*************
How should I declare in Gambas those external functions contained in the
structure? ...as Pointer ? But "where" ? In a Structure ? EXTERN will not be
used ?
And then "how" do I use those functions in Gambas code ?
Best regards
vuott
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user