Answered
0
0

I use the following code to init FMOD.

unsigned int     version;
int              numdrivers;
FMOD_SPEAKERMODE speakermode;
FMOD_CAPS        caps;

FMOD_RESULT result = FMOD::EventSystem_Create(&m_EventSystem);
FMOD_ERR_CHECK(result);

result = m_EventSystem->getSystemObject(&m_System);
FMOD_ERR_CHECK(result);

result = m_System->getVersion(&version);
FMOD_ERR_CHECK(result);

if (version < FMOD_VERSION)
{
    printf("Error!  You are using an old version of FMOD %08x.  This program requires %08x\n", version, FMOD_VERSION);
    return;
}

result = m_System->getNumDrivers(&numdrivers);
FMOD_ERR_CHECK(result);

if (numdrivers == 0) 
{
    result = m_System->setOutput(FMOD_OUTPUTTYPE_NOSOUND);
    FMOD_ERR_CHECK(result);
}

result = m_System->setDSPBufferSize(2048, 4);
FMOD_ERR_CHECK(result);

m_System->setFileSystem(FMOD_FILE_OPENCALLBACK, FMOD_FILE_CLOSECALLBACK, FMOD_FILE_READCALLBACK, FMOD_FILE_SEEKCALLBACK, NULL, NULL, 1024 * 256);
FMOD_ERR_CHECK(result);

result = m_System->init(32, FMOD_INIT_NORMAL, 0);
FMOD_ERR_CHECK(result);

And here is the init log.

FMOD: OutputWASAPI::enumerate : Enumerating…
FMOD: OutputWASAPI::enumerate : Done.
FMOD: SystemI::init : FMOD Ex Version: 00044440
FMOD: SystemI::init : maxchannels = 32, flags = 00000000, extradriverdata = 00000000
FMOD: SystemI::close :
FMOD: SystemI::close : Stop all sounds
FMOD: SystemI::close : Shut down output.
FMOD: OutputWASAPI::close : Closing…
FMOD: OutputWASAPI::close : Done.
FMOD: SystemI::close : Remove miscllaneous DSP stuff.
FMOD: SystemI::close : done.
FMOD: OutputWASAPI::enumerate : Enumerating…
FMOD: OutputWASAPI::enumerate : Done.
FMOD: OutputWASAPI::initEx : Initialising…
FMOD: OutputWASAPI::initEx : Done.
FMOD: SystemI::init : Set up software engine
FMOD: Thread::initThread : Initializing FMOD (WASAPI) feeder thread. priority 1
FMOD: Thread::initThread : – Stacksize 0. Stack pointer 00000000 : usesemaphore = 0 : sleeptime = 0
FMOD: Thread::callback : * FMOD (WASAPI) feeder thread started
FMOD: Thread::initThread : done.
FMOD: Thread::initThread : Initializing FMOD mixer thread. priority 2
FMOD: Thread::initThread : – Stacksize 49152. Stack pointer 00000000 : usesemaphore = 1 : sleeptime = 0
FMOD: Thread::callback : * FMOD mixer thread started
FMOD: Thread::initThread : done.
FMOD: SystemI::init : Set up emulated output
FMOD: SystemI::init : create the channel pool
FMOD: SystemI::init : Set up streamer
FMOD: Thread::initThread : Initializing FMOD stream thread. priority 2
FMOD: Thread::initThread : – Stacksize 65536. Stack pointer 00000000 : usesemaphore = 0 : sleeptime = 10
FMOD: Thread::callback : * FMOD stream thread started
FMOD: Thread::initThread : done.
FMOD: SystemI::init : done

when I called any method of FMOD::EventSystem (eg. getCategory, load) and received:
FMOD error! (31) FMOD was not initialized correctly to support this function.

I used the fev, fsb file that were used in ios and android.
Did something i miss?
thx!

  • You must to post comments
Best Answer
1
0

You need to call EventSystem::Init() not System::Init().

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.