Thank you, mr.Chris Kawa. I was able to make it work in Wine + MinGW. Apparenlty Ive read there were C++ ABI problems, so Ive changed my function to the pure C API they support like that:
@
bool FMPlayer::systemInit(const char *fname, int len) {
FMOD_CREATESOUNDEXINFO *info = new FMOD_CREATESOUNDEXINFO();
info->cbsize = sizeof(FMOD_CREATESOUNDEXINFO);
info->length = len;
FMOD_CHANNEL *channel;
//FMOD::Channel* channel;
//FMOD::System* system;
//FMOD::Sound* sound;
//FMOD::System_Create(&system);
FMOD_SYSTEM *system;
FMOD_SOUND *sound;
FMOD_System_Create(&system);
FMOD_System_Init(system, 32, FMOD_INIT_NORMAL, 0);
//system->init(32, FMOD_INIT_NORMAL, 0);
if ( FMOD_OK == ( FMOD_System_CreateSound(system,
fname,FMOD_OPENMEMORY, info, &sound)) ) {
// if ( FMOD_OK == system->createSound(fname,
// FMOD_OPENMEMORY, info, &sound) ) {
FMOD_Sound_SetMode(sound, FMOD_LOOP_OFF);
// sound->setMode(FMOD_LOOP_OFF);
// system->playSound(sound, false, 0, &channel);
FMOD_System_PlaySound(system, sound, false, 0, &channel);
return true;
} else {
return false;
}
}
@
Ive left the commented code to see what Ive changed. Now it plays the desired sound... Whew. That was nasty. I got worried I wont be able to fix it. Thanks for the help. Ill avoid and whitespaces from now on. Regards from a newbie coder like me :)