Page 1 of 1
Complete FMOD PureBasic port
Posted: Sun Oct 12, 2003 11:42 pm
by KarLKoX
Hi ! Another PureBasic port of the excellent FMOD library can be found
here with 8 examples.
Posted: Mon Oct 13, 2003 1:57 pm
by Froggerprogger
Cool! Thanks!
But perhaps you could change the filename to *pb.zip or something like that? Because now it's called the same way as the fmod.org's original .zip but contains more material (the PB stuff). Just an idea.

Posted: Mon Oct 13, 2003 4:28 pm
by KarLKoX
Hi ! This is because Brett will add the url to this port, though PB users will not need to download the PB Port + the official FMOD archive. Here, all is packaged and ready to use

Btw, i see in your fmod examples that FSOUND_GetCpuUsage() works fine, i don't know why it doesn't work with fmod 3.70, if you have an idea ...
FSOUND_GetVersion() is the other function wich i can't manage to get it working

Posted: Mon Oct 13, 2003 8:23 pm
by Froggerprogger
Okay, so the PB-port becomes half-official for Brett
To answer your question:
1. Fsound_GetCPUUsage() returns a Float-value. You forgot the .f in your Includefile "fmod_proc.pbi":
2. But that doesn't solve the problem. There's a PB-Bug with recieving Float-values from CallFunction().
See here:
viewtopic.php?p=36409#36409
So as a workaround for the moment we have to insert the two following lines directly behind the function call:
Code: Select all
!FSTP dword [esp]
!POP [v_result] ; replace 'result' by the Float-variable name for the Function-result
So here's an example:
Code: Select all
IncludeFile "con_struc.pbi"
IncludeFile "fmod_proc.pbi"
Global result.f
LoadFmod()
result.f = FSOUND_GetVersion()
!FSTP dword [esp]
!POP [v_result]
MessageRequester("",StrF(result),0)
CloseFmod()
I think it makes no sense to implement those two lines inside your Wrapper-Procedures, because it's just a temporarily workaround.
I have not tested it with the corrected FSOUND_GetCPUUsage() until now, but I think it'll work, too.
Posted: Mon Oct 13, 2003 9:38 pm
by KarLKoX
Ok, i missed this topic, i was searching the forum for StrF() function wich i think it was faulty =)
I ll keep the sourcecode without this modification, as you said, it is only a temporarly workaround. I d rather prefer to wait for a PureBasic update or i ll try to ask Brett to return a String rather than a float (i don't think i ll change his Api only for purebasic users but who knows ... ).
Btw, thanx answering me and for this code snippet, i also just began to learn asm (a week ago)

Posted: Fri Nov 28, 2003 12:02 am
by KarLKoX
Fmod 3.71 for PureBasic is up and ready with two new examples (cdda playback/rip), get it
here.
Posted: Sat Nov 29, 2003 11:00 am
by Le Soldat Inconnu
c'est quoi cette signature karLKoX, heureusement que c'est sur le forum anglais

Posted: Sat Nov 29, 2003 3:59 pm
by KarLKoX
Le Soldat Inconnu wrote:c'est quoi cette signature karLKoX, heureusement que c'est sur le forum anglais

Tu ne connais apparamment pas bien Desproges :roll: