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

Edward Stein edward.audiodsp at gmail.com
Fri Jul 11 13:11:22 PDT 2008


Hello Daniel,

Thanks for your quick reply, and good solution.  We can go with the
"or am I missing something obvious" part of my previous email :-)
I was forgetting to set the context to NULL before closing.  This only
seemed to cause a problem when complicated by the EFX extension.  The
fact that it was not a problem for the specific device driver and only
happened when I got to the EFX part of my application led me down the
wrong path in debugging.  Thanks for your help and maintaining an A+
list.

Best regards,
Edward






On Fri, Jul 11, 2008 at 12:53 PM, Daniel PEACOCK
<dpeacock at creativelabs.com> wrote:
> Hi Edward,
>
> I have not seen this problem before.
>
> Do you have the latest wrap_oal.dll (2.1.8.1)?
>
> If you have the Creative OpenAL SDK - does the EFXReverb test application
> show the problem (or can it be modified so that it does)?
>
> In your shutdown code are you ...
>
> Stopping & Deleting all the Sources
> Deleting Buffers
> Deleting Aux Effect Slots
> Deleting Filters
> Making the current Context NULL, then destroying it, then closing the device
>
> Dan
> Creative Labs, Inc.
>
> ________________________________
> Notice
> The information in this message is confidential and may be legally
> privileged. It is intended solely for the addressee. Access to this message
> by anyone else is unauthorized. If you are not the intended recipient, any
> disclosure, copying or distribution of the message, or any action taken by
> you in reliance on it, is prohibited and may be unlawful. If you have
> received this message in error, please delete it and contact the sender
> immediately. Thank you.
>
>
> "Edward Stein" <edward.audiodsp at gmail.com>
>
>
> "Edward Stein" <edward.audiodsp at gmail.com>
> Sent by: openal-bounces at opensource.creative.com
>
> 07/11/2008 11:57 AM
>
> To
> openal at opensource.creative.com
> cc
>
> Subject
> [Openal] Error closing Generic SW/Generic HW device with EFX
> 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.
> _______________________________________________
> Openal mailing list
> Openal at opensource.creative.com
> http://opensource.creative.com/mailman/listinfo/openal
>
> ForwardSourceID:NT00062F92
>


More information about the Openal mailing list