0
0

Hello Everyone,
I was looking into starting to use FMOD and I was having a few issues getting started I was hoping someone could help me get going. Im using a very simple program just to try and get it working

include <Carbon/Carbon.h>

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 &lt;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]);
}

When I compile it I get undefined errors on all the FMOD commands. Am I missing a header file somewhere? If I try and add libfmod.a to my project I get an out of date error.

Thanks everyone for your time, let me know if you need more info.

  • You must to post comments
0
0

Not sure if you already solved your problem. If not, this should remedy it:

Use Terminal to change directories into the directory with your libfmod.a. Type “ranlib libfmod.a”

This should bring the library up to date. It should compile after this.

Mark

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.