0
0

I recently started using FMOD (or trying to, anyways), I tried to set it up my self in a way that would be good for my application and for some reason it’s not creating. here’s a screen shot of what it says when I run my App.

[img:lgwybnqs]http://img.photobucket.com/albums/v238/adarksoul/FMOD.jpg?t=1298429167[/img:lgwybnqs]

and here’s the code:

[code:lgwybnqs]

FMOD::System*IrrSoundMgr::pSystem = 0;

IrrSoundMgr::IrrSoundMgr()
{

}

IrrSoundMgr::~IrrSoundMgr()
{

}

bool IrrSoundMgr::createSoundMgr()
{
   FMOD_RESULT result;

   result = FMOD::System_Create(&pSystem);

   if (result != FMOD_OK)
   {
      char Buffer[256];
      sprintf_s(Buffer,"FMOD error: %s", FMOD_ErrorString(result));
      MessageBoxA(NULL,Buffer,"",MB_OK);
   }

   result = pSystem->init(100,FMOD_INIT_NORMAL,0);

   pSystem->setDriver(0);
   if(result != FMOD_OK)
   {
      char Buffer[256];
      sprintf_s(Buffer,"FMOD error: %s", FMOD_ErrorString(result));
      MessageBoxA(NULL,Buffer,"",MB_OK);
   }

   return true;
}

void IrrSoundMgr::update()
{
   pSystem->update();
}

FMOD::System* IrrSoundMgr::getSystem()
{
   return pSystem;
}

[/code:lgwybnqs]

not really sure what i’m doing wrong….Hmmm

  • You must to post comments
0
0

sorry for the triple post but got it to work (somewhat) I got the message about an invalid parameter, and i can’t be sure as to where that is coming from…. hmmm, prob should re-write the class….

  • You must to post comments
0
0

so use the l version? got it!

  • You must to post comments
0
0

strange thing, i tried to just use fmodex.dll and it’s sdaying that it can’t find it, when i put the other 2 DLLs still get those init errors….(Hmmm)

  • You must to post comments
0
0

fmodexp.dll is the plugin version which is probably not what you want.

  • You must to post comments
0
0

i’m, using fmodex.dll, and the error seems to be after calling the init function fmodexp.dll so i don’t know.

  • You must to post comments
0
0

Can you pinpoint the line where the occurs?
What fmod dll are you using? fmod_event.dll/fmodex.dll or fmod_eventL.dll/fmodexL.dll?

  • You must to post comments
0
0

Ok, i looked in the docs to find a way to set it up, I did this (the recommended setup) and still got the same error:

[code:18zqjl2r]

bool IrrSoundMgr::createSoundMgr()
{
// Create the System
result = FMOD::System_Create(&this->pSystem);
this->ERRCHECK(result);

   result = pSystem->getVersion(&version);
   ERRCHECK(result);
   if(version < FMOD_VERSION)
   {
      char Buffer[256];
      sprintf_s(Buffer,"Wrong FMOD Version: %08x",FMOD_VERSION);
   }

   result = pSystem->getNumDrivers(&numDrivers);
   ERRCHECK(result);

   if(numDrivers == 0)
   {
      result = pSystem->setOutput(FMOD_OUTPUTTYPE::FMOD_OUTPUTTYPE_NOSOUND);
      ERRCHECK(result);
   }
   else
   {
      result = pSystem->getDriverCaps(0,&caps,0,0,&speakerMode);
      ERRCHECK(result);

      result = pSystem->setSpeakerMode(speakerMode);
      ERRCHECK(result);

      if(caps & FMOD_CAPS_HARDWARE_EMULATED)
      {
         result = pSystem->setDSPBufferSize(1024,10);
         ERRCHECK(result);
      }

      result = pSystem->getDriverName(numDrivers,name,256);
      ERRCHECK(result);

      if(strstr(name, "RealTek"))
      {
         result = pSystem->setSoftwareFormat(48000,FMOD_SOUND_FORMAT_PCMFLOAT,0,0,FMOD_DSP_RESAMPLER_LINEAR);
         ERRCHECK(result);
      }
   }

   result = pSystem->init(100,FMOD_INIT_NORMAL,0);
   if(result == FMOD_ERR_OUTPUT_CREATEBUFFER)
   {
        result = pSystem->setSpeakerMode(FMOD_SPEAKERMODE_STEREO);
        ERRCHECK(result);

        result = pSystem->init(100,FMOD_INIT_NORMAL,0);
        ERRCHECK(result);
   }
   return true;
}

[/code:18zqjl2r]

sigh why am i the only one to always have these problems?

  • You must to post comments
Showing 7 results
Your Answer

Please first to submit.