FMOD Questions

Moderator
Posts: 613
Joined: 2004.09
Post: #1
Ive been looking into methods for using sounds in my newest game. I looked at OpenAL and I dont want to have to include the installer for it. Sound Manager seems to be becomming fast outdated and i kind of wanted to avoid it. Quicktime playback also seems like a nightmare waiting to happen.

I then came across some old post here about FMOD (http://www.fmod.org/) and it looks pretty good, although does anyone have a carbon(xcode) example of this so i can look through how to get it working correctly? Anyone use it recently? Good/Bad Experinces?

Thanks!

Kyle Richter
DragonForged.com
Twitter: @kylerichter
Quote this message in a reply
Member
Posts: 320
Joined: 2003.06
Post: #2
I used it in Chopper (objC) and my current game which is C++ / SDL. I found a few problems with mod playback in Chopper, and I can't seem to get mp3s to loop seemlessly, but other than that I'm happy. Really easy so set up streaming mp3 or do things like modify frequencies of looping aifs for engine sounds etc.

There aren't really any gotchas just add libfmod.a, fmod_errors.h and fmod.h to your project, #include "fmod.h", call FSOUND_Init, load a sound with FSOUND_Sample_Load, then FSOUND_PlaySound to play. It should just work.

David

Chopper, iSight Screensavers, DuckDuckDuck: http://majicjungle.com
Quote this message in a reply
Moderator
Posts: 613
Joined: 2004.09
Post: #3
Well I guess thats it then =p

Thanks for the help david.

Kyle Richter
DragonForged.com
Twitter: @kylerichter
Quote this message in a reply
Moderator
Posts: 613
Joined: 2004.09
Post: #4
Ok well i got it working easy enough and all. It works fine from compiling within xcode but when i run it outside of xcode the sounds dont play at all. Any ideas what I might be doing wrong? Want to look at my code?

Kyle Richter
DragonForged.com
Twitter: @kylerichter
Quote this message in a reply
Moderator
Posts: 613
Joined: 2004.09
Post: #5
Heres my code for the interested,

#include <fmod.h>
#include <fmod_errors.h>

FSOUND_SAMPLE *samp[10];

void initSounds()
{
if (!FSOUND_Init(44100, 32, FSOUND_INIT_USEDEFAULTMIDISYNTH))
{
printf("Error!\n");
printf("%s\n", FMOD_ErrorString(FSOUND_GetError()));
}

int i;

for (i = 0; i <10; i++)
samp[i] = 0;

samp[0] = FSOUND_Sample_Load(FSOUND_UNMANAGED, "../drumloop.wav", FSOUND_NORMAL | FSOUND_NORMAL, 0, 0);
FSOUND_Sample_SetMode(samp[0], FSOUND_LOOP_OFF); //turn off looping for this track
}


void playSound(int i)
{
FSOUND_PlaySound(FSOUND_FREE, samp[i]);
}

Kyle Richter
DragonForged.com
Twitter: @kylerichter
Quote this message in a reply
Moderator
Posts: 1,560
Joined: 2003.10
Post: #6
kodex Wrote:I looked at OpenAL and I dont want to have to include the installer for it.

You don't have to. You can bundle the framework in the application. FMOD has licensing issues, and I've heard a lot of people like OpenAL better. I haven't used FMOD myself, so I don't know how they compare, but my experience with OpenAL has been very good. I'd highly recommend at least trying it. Even if you don't end up using it for the final product, it's good to know what your options are.

- Alex Diener
Quote this message in a reply
Moderator
Posts: 613
Joined: 2004.09
Post: #7
I fixed my issue it was path related. Sorry for making people look through my code =p

Kyle Richter
DragonForged.com
Twitter: @kylerichter
Quote this message in a reply
Puzzler183
Unregistered
 
Post: #8
ThemsAllTook Wrote:FMOD has licensing issues

Deny. FMOD is free for free stuff, ~$100 for shareware and expensive for truly commercial applications. You just have to read the fine print; in reality it's very affordable.
Quote this message in a reply
Member
Posts: 110
Joined: 2002.07
Post: #9
im using it, its really easy to use, i made a test on PC too and it work well
nice to do cross platform game with sound

in my case it worth buying it
im using OGG vorbis playback streaming from the HD (not loading the music in memory) and the loops are nice, no strange sound poping at the end of the loop
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Fmod &amp; bus error barbeirovsk 0 1,952 May 8, 2009 02:51 PM
Last Post: barbeirovsk
  OpenAL, Fmod, Miles, PortAudio. Is there anything else? Malarkey 16 12,355 Mar 19, 2009 09:04 AM
Last Post: AnotherJake
  fmod on tiger (10.4.11) AcidZombie24 2 2,715 Sep 10, 2008 01:05 PM
Last Post: AcidZombie24