Ok, the latest attempt looks as below.
All is ok until the second last line (call to FSOUND_Init).
I'm wondering if the order I've put the
arguments on the stack is wrong or if they
need to be cast to int, int, uint or something like that.
! Date: 19-Mar-2007
! Author: "Anton Rolls"
! Status: "not working, something to do with types sent to FSOUND_Init ?"
! ToDo:
! - get FSOUND_Init working
USING: kernel alien prettyprint ;
IN: fmod
"fmod" "Anton/fmod.dll" "stdcall" add-library
! DLL_API float F_API FSOUND_GetVersion();
: FSOUND_GetVersion "float" "fmod" "[EMAIL PROTECTED]" { } alien-invoke ;
! DLL_API signed char F_API FSOUND_Init(int mixrate, int
maxsoftwarechannels, unsigned int flags);
: FSOUND_Init "char" "fmod" "[EMAIL PROTECTED]" { } alien-invoke ;
! DLL_API void F_API FSOUND_Close();
: FSOUND_Close "void" "fmod" "[EMAIL PROTECTED]" { } alien-invoke ;
USE: compiler
\ FSOUND_GetVersion compile
\ FSOUND_Init compile
\ FSOUND_Close compile
! test
FSOUND_GetVersion . ! ===> 3.740000009536743 (the expected value)
32000 64 0 FSOUND_Init . ! Problem here with "Operating system signal 11"
FSOUND_Close
--
Anton.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk