[Openal] Error closing Generic SW/Generic HW device with EFX

Edward Stein edward.audiodsp at gmail.com
Fri Jul 11 11:57:05 PDT 2008


Hello All,

I am using OpenAL 1.1 SDK with EFX extensions (efx.h).  The
application lets the user select Generic Software or anything
enumerated by GetString with ALC_DEVICE_SPECIFIER.  It loads some
sources and the AL_EFFECT_REVERB into a single auxiliary effects slot.
 It all works fine with the specific hardware device.  It works with
the Generic Software device, but then crashes on exit when the
alcDestroyContext and/or alcCloseDevice are called.  This error goes
away if I do not generate any aux slots or effects and, as I mention
above, does not happen with the specific hardware device.  Even
creating a single aux slot or effect and immediately destroying it
will cause the error on the Generic device drivers.  Is this a known
issue or am I missing something obvious?

I believe I am using proper error handling to prevent this kind of
thing... (See below).
Any help would be appreciated.

Best regards,
Edward


//Query EFX
if(alcIsExtensionPresent(Device[Mix], "ALC_EXT_EFX")==FALSE)
{
  CString EFXError(DriverName);
  EFXError+=" Does Not support EFX";
  AfxMessageBox(EFXError);
  exit(-1);
}
 and
TheEffectFunctions[Mix] = GetEFXExtensionStruc();
if(!(TheEffectFunctions[Mix].alIsEffect
     && TheEffectFunctions[Mix].alGenEffects
     && TheEffectFunctions[Mix].alDeleteEffects
     && TheEffectFunctions[Mix].alGenAuxiliaryEffectSlots
     && TheEffectFunctions[Mix].alDeleteAuxiliaryEffectSlots
     && TheEffectFunctions[Mix].alEffecti
     && TheEffectFunctions[Mix].alEffectf
     && TheEffectFunctions[Mix].alAuxiliaryEffectSloti
     ))
{
    CString EFXFuncError("Could not resolve EFX Functions");
    AfxMessageBox(EFXFuncError);
    exit(-1);
}

after

EFX_EXTENSION_STRUCT MyApp::GetEFXExtensionStruc()
{
   EFX_EXTENSION_STRUCT tmp;
   tmp.alGenEffects = (LPALGENEFFECTS) alGetProcAddress("alGenEffects");
   tmp.alDeleteEffects = (LPALDELETEEFFECTS)
alGetProcAddress("alDeleteEffects");
   tmp.alIsEffect = (LPALISEFFECT) alGetProcAddress("alIsEffect");
   tmp.alEffecti = (LPALEFFECTI) alGetProcAddress("alEffecti");
   tmp.alEffectf = (LPALEFFECTF) alGetProcAddress("alEffectf");
   tmp.alGenAuxiliaryEffectSlots = (LPALGENAUXILIARYEFFECTSLOTS)
alGetProcAddress("alGenAuxiliaryEffectSlots");
   tmp.alDeleteAuxiliaryEffectSlots = (LPALDELETEAUXILIARYEFFECTSLOTS)
alGetProcAddress("alDeleteAuxiliaryEffectSlots");
   tmp.alAuxiliaryEffectSloti = (LPALAUXILIARYEFFECTSLOTI)
alGetProcAddress("alAuxiliaryEffectSloti");
   return tmp;
}

etc.  None of these cause failures or errors.


More information about the Openal mailing list