I am using FMOD and that I downloaded from it page http://www.fmod.org
I make a little program that play sound:
Sound Engine.h
Code: Select all
#ifndef SOUNDENGINE_H_
#define SOUNDENGINE_H_
#include "FMOD/inc/fmod.hpp" //fmod c++ heade
using namespace FMOD;
class SoundEngine{
public:
bool initSystem(void);
private:
//FMod Stuff
System *system; //handle to FMOD engine
Sound *sound1, *sound2; //sound that will be loaded and played
};
#endif /* SOUNDENGINE_H_ */
Code: Select all
#include "SoundEngine.h"
bool SoundEngine::initSystem()
{
System_Create(&system);// create an instance of the game engine
system->init(32, FMOD_INIT_NORMAL, 0);// initialise the game engine with 32 channels
//load sounds
system->createSound("Media/NoMoreMagic.ogg", 1, 0, &sound1);
sound1->setMode(FMOD_LOOP_OFF); /* drumloop.wav has embedded loop points which automatically makes looping turn on, */
/* so turn it off here. We could have also just put FMOD_LOOP_OFF in the above CreateSound call. */
return true;
}
When I compile, I get one error in fmod.hpp, in the line 46:
Code: Select all
inline FMOD_RESULT System_Create(System **system) { return FMOD_System_Create((FMOD_SYSTEM **)system); }
I am working in Ubuntu and Eclipse.
Anyone knows what problem it is? Is something library not included in the system. I only do the things that I have posted here, anything more, so maybe is some library that I dont put in the correct folder, but I dont know which library can be,
Thanks for your time.
EDITED:I think that I solve the problem. I add the .so to /usr/local/lib and seems that it work. Now I have the error that I have is that the program cant find the FMOD constans like FMOD_HARDWARE, FMOD_CHANNEL_FREE, etc.. Anyone know where are the constants?