0
0

When I try to do a nonblocking load on a sound file that doesn’t exist using the new OpenAL output type (OpenAL32.dll provided by openal.org) I get a crash when trying to release the sound after it’s returned FMOD_OPENSTATE_ERROR.

Whew!

Here’s an example program:
[code:2ngi972r]static void sCheckOpenState(FMOD::Sound *& pSound)
{
FMOD_OPENSTATE eState;
pSound->getOpenState(&eState, NULL, NULL);
switch(eState)
{
case FMOD_OPENSTATE_READY:
{
}
break;
case FMOD_OPENSTATE_LOADING:
{
}
break;
case FMOD_OPENSTATE_BUFFERING:
{
}
break;
case FMOD_OPENSTATE_CONNECTING:
{
}
break;
case FMOD_OPENSTATE_ERROR:
{
pSound->release();
pSound = NULL;
}
break;
}
}

int main(int argc, char* argv[])
{
FMOD::System * pSystem = NULL;
FMOD::Sound * pSound = NULL;
FMOD::Channel * pChannel = NULL;

FMOD::System_Create(&pSystem);
pSystem->setOutput(FMOD_OUTPUTTYPE_OPENAL);

pSystem->init(512, FMOD_INITFLAGS(FMOD_INIT_NORMAL | FMOD_INIT_DSOUND_HRTFFULL), NULL);

char szPath[ 128 ];
strcpy_s(szPath, 128, "nonexistent.wav");

int nMode = FMOD_DEFAULT | FMOD_LOOP_NORMAL | FMOD_3D | FMOD_HARDWARE | FMOD_CREATESAMPLE | FMOD_NONBLOCKING;

FMOD_RESULT res = FMOD_OK;
res = pSystem->createSound(szPath, nMode, NULL, &pSound);

while(1)
{
    if(pSound)
    {
        sCheckOpenState(pSound);
    }
    else
        break;
    pSystem->update();
}

pSystem->release();

return 0;

}
[/code:2ngi972r]

This only happens with nonblocking hardware samples with the OpenAL outputtype. Changing to software sound, changing to streams, removing the nonblocking sound, or changing the output type to DSOUND this problem doesn’t happen.

I’m using a Creative Labs X-Fi Fatality sound card (if it matters).

Thanks!

  • Guy
  • You must to post comments
0
0

Thanks, this problem has been fixed for the next release

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.