FMOD - The use and application of...

BlitzMax Forums/BlitzMax Tutorials/FMOD - The use and application of...

MrTAToad(Posted 2007) [#1]
Okay, we'll start with the modified BMK :

If you look at http://www.blitzmax.com/Community/posts.php?topic=67519#754178 , ol' Brucey has modified the BMK program to allow Windows/Linux/Mac to accept -L and -l, which is needed to direct the compiler to where the FMOD library file is (you will need to download and install the very latest version from www.fmod.org ).

Note there is a lot of difference between the current version, and the version that most people discuss with FSOUND_x functions.

The download file from Bruce includes the Windows version, so you'll need to compile it for the Mac. Linux doesn't need it, if I remember correctly.

As I mentioned elsewhere, the -L doesn't like spaces in paths, so something like -LC:\Program Files wont compile, and will complain about -LC:\Program

The C code, would, for neatness sake, go in with your BlitzMax code. If I need to edit anything I use XCode/Visual Studio/Text Edit (depending on operating system)...

The C code, along with the FMOD constants and test program, can be found here : http://www.blitzmax.com/Community/posts.php?topic=49584 - at the bottom...

Its not a complete set of functions, just the most useful.

FMOD or BASS - Use a C function or a fish ?
----------------------------------------------------

With regards to which to use (I also have a BASS interface system around too), it would depend on how simple you want to keep things - BASS is a lot easier to use than FMOD, although, of course, they do more or less the same type of things.

There are a few downsides to BASS - there is currently on Linux version - which means if your developing for said operating system, then BASS is an immediate no-go. It also seems to suffer from a little bit of lag on slow hard drives (ie a DNS-323), even with a large buffer file, which doesn't affect FMOD.

However, for the Mac at least, the BASS dylib can be included in the BlitzMax package, and the program will run fine, whilst with FMOD, the program will close immediately complaining it can't find the dylib...

There is also a further Mac oddity with BASS - the current version of it always returns (in the BlitzMax IDE) a OSKernel error of 15 - it doesn't affect anything (and it wont be noticed when run from Finder).

However, the BASS library is, for the Mac anyway, Universal, whilst it isn't for FMOD (which you would have to do for yourself).

With FMOD, things are a little bit more complicated, especially with reading and setting positions in music files (you can specify positions based on millsecond position, PCM position and a few other things).

However, it doesn't suffer lag from reading from slow devices, and of course, it supports the Big Three operating systems.

Community support is good, although one thing to look out for, if you add any extra functions using C, the function names in the help file wont be accurate...

Both seem stable, and both allow easy access to the music data - FMOD having two ways to do it.

With both, they are free for non commercial programs (ie, your not selling anything), whilst if you are, then shareware (hobbyist) is $100 (£50.47) for FMOD, and 100E (£68) for BASS. Commerical prices aren't worth mentioning.


kfprimm(Posted 2007) [#2]
-l is already in BMK...


The r0nin(Posted 2007) [#3]
The link www.blitzmax.com/Community/posts.php?topic=67519#754178 doesn't work for me (yes, I removed the comma). I get an "Internal Error" from the website.


MrTAToad(Posted 2007) [#4]
Fine here - try copying and pasting... i have noticed that some old posts do give that error message though.


kfprimm(Posted 2007) [#5]
You have to make sure you are logged on the same domain as the link. For example, I'm logged into www.blitzbasic.com so i have to change the www.blitzmax.com to www.blitzbasic.com.


Space Fractal(Posted 2007) [#6]
please edit the www.fmod.org link.

Im diddent know the C file just can import like a bmk file, here I just import it as "FMod.C".

I got this to work.

Just remember to alther the lines, where the lib is in the C code (that point to the H file) and copy the SO files itself into your own source dir.


MrTAToad(Posted 2007) [#7]
Thats been updated.


Grisu(Posted 2007) [#8]
The requested URL /programming/blitz/misc/stuff/bmk_tweaked.zip was not found on this server.

Btw: can you include the dll inside the exe this way?
Is fmod4.0 compatible to fmod 3.5 or do I have to rewrite all my sound routines?


MrTAToad(Posted 2007) [#9]
I believe your going to have to rewrite it.


CASO(Posted 2007) [#10]
The FMOD topic in Blitzmax Programming is really long and hard to follow. Is there a place where I could find some simple examples and how to use the commands?


CASO(Posted 2008) [#11]
/\ Any News? /\


JeffJohn(Posted 2008) [#12]
the compiler cannot find the following...

fmod.release.win32.x86.a

Can anyone please help me, thanks.
Jeff.