Error closing Generic SW/Generic HW device with EFX

View: New views
3 Messages — Rating Filter:   Alert me  

Error closing Generic SW/Generic HW device with EFX

by Edward Stein :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...
http://opensource.creative.com/mailman/listinfo/openal

Re: Error closing Generic SW/Generic HW device with EFX

by Daniel PEACOCK :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message





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@                                            
             gmail.com>                                                 To
             Sent by:                  openal@...      
             openal-bounces@op                                          cc
             ensource.creative                                            
             .com                                                  Subject
                                       [Openal] Error closing Generic      
                                       SW/Generic HW device with EFX      
             07/11/2008 11:57                                              
             AM                                                            
                                                                           
                                                                           
                                                                           
                                                                           




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@...
http://opensource.creative.com/mailman/listinfo/openal

ForwardSourceID:NT00062F92

_______________________________________________
Openal mailing list
Openal@...
http://opensource.creative.com/mailman/listinfo/openal

Re: Error closing Generic SW/Generic HW device with EFX

by Edward Stein :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...> 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@...>
>
>
> "Edward Stein" <edward.audiodsp@...>
> Sent by: openal-bounces@...
>
> 07/11/2008 11:57 AM
>
> To
> openal@...
> 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@...
> http://opensource.creative.com/mailman/listinfo/openal
>
> ForwardSourceID:NT00062F92
>
_______________________________________________
Openal mailing list
Openal@...
http://opensource.creative.com/mailman/listinfo/openal
LightInTheBox - Buy quality products at wholesale price