[OpenAL : EFX] alGetProcAddress() Problem =/

E70f63aceb25fa57bee707b4edbef0c1
0
L1zb3th 101 Apr 29, 2007 at 02:25

well, now this is part of the code :

this->Info->alGenEffects = (LPALGENEFFECTS) alGetProcAddress("alGenEffects");

this->Info->alDeleteEffects = (LPALDELETEEFFECTS) alGetProcAddress("alDeleteEffects");

this->Info->alIsEffect = (LPALISEFFECT) alGetProcAddress("alIsEffect");

this->Info->alGenAuxiliaryEffectSlots = (LPALGENAUXILIARYEFFECTSLOTS) alGetProcAddress("alGenAuxiliaryEffectSlots");

and Info gots this members :

LPALGENEFFECTS alGenEffects;
LPALDELETEEFFECTS alDeleteEffects;
LPALISEFFECT alIsEffect;
LPALGENAUXILIARYEFFECTSLOTS  alGenAuxiliaryEffectSlots;

the code points the problem here =/ :

if (!(this->Info->alGenEffects && this->Info->alDeleteEffects && this->Info->alIsEffect && this->Info->alGenAuxiliaryEffectSlots)) this->Installed = -2;
this->Error = alGetError();
if (this->Installed<0) return -3;

what happens ? well alGenEffects,alDeleteEffects,alIsEffect and alGenAuxiliaryEffectSlots are equal to NULL, so, the problem is that something is not working with alGetProcAddress() ..
and this is getting me crazy xD
Error have the value of 0, so, alGetError tell me thats its all fine when not ..

so, if somebody can give me a clue, i will apreciate it so much \^.\^

Au Revoir !

4 Replies

Please log in or register to post a reply.

0ce469221f4bbea25359910270be876a
0
Skaldi 101 Aug 19, 2007 at 15:37

Hello L1zb3th!

To get valid functionpointers from alGetProcAddress, the context has to be made the current context, before using alGetProcAddress

alcMakeContextCurrent(yourContext);

After successfully calling this function, you will receive valid pointers.

Happy Coding
Skaldi

0ce469221f4bbea25359910270be876a
0
Skaldi 101 Aug 19, 2007 at 15:47

Hello L1zb3th again.

by the way a full List of EFX functions here.

Initialisation:

             alGenEffects = (LPALGENEFFECTS)alGetProcAddress("alGenEffects");
    alDeleteEffects = (LPALDELETEEFFECTS )alGetProcAddress("alDeleteEffects");
    alIsEffect = (LPALISEFFECT )alGetProcAddress("alIsEffect");
    alEffecti = (LPALEFFECTI)alGetProcAddress("alEffecti");
    alEffectiv = (LPALEFFECTIV)alGetProcAddress("alEffectiv");
    alEffectf = (LPALEFFECTF)alGetProcAddress("alEffectf");
    alEffectfv = (LPALEFFECTFV)alGetProcAddress("alEffectfv");
    alGetEffecti = (LPALGETEFFECTI)alGetProcAddress("alGetEffecti");
    alGetEffectiv = (LPALGETEFFECTIV)alGetProcAddress("alGetEffectiv");
    alGetEffectf = (LPALGETEFFECTF)alGetProcAddress("alGetEffectf");
    alGetEffectfv = (LPALGETEFFECTFV)alGetProcAddress("alGetEffectfv");
    alGenFilters = (LPALGENFILTERS)alGetProcAddress("alGenFilters");
    alDeleteFilters = (LPALDELETEFILTERS)alGetProcAddress("alDeleteFilters");
    alIsFilter = (LPALISFILTER)alGetProcAddress("alIsFilter");
    alFilteri = (LPALFILTERI)alGetProcAddress("alFilteri");
    alFilteriv = (LPALFILTERIV)alGetProcAddress("alFilteriv");
    alFilterf = (LPALFILTERF)alGetProcAddress("alFilterf");
    alFilterfv = (LPALFILTERFV)alGetProcAddress("alFilterfv");
    alGetFilteri = (LPALGETFILTERI )alGetProcAddress("alGetFilteri");
    alGetFilteriv = (LPALGETFILTERIV )alGetProcAddress("alGetFilteriv");
    alGetFilterf = (LPALGETFILTERF )alGetProcAddress("alGetFilterf");
    alGetFilterfv = (LPALGETFILTERFV )alGetProcAddress("alGetFilterfv");
    alGenAuxiliaryEffectSlots = (LPALGENAUXILIARYEFFECTSLOTS)alGetProcAddress("alGenAuxiliaryEffectSlots");
    alDeleteAuxiliaryEffectSlots = (LPALDELETEAUXILIARYEFFECTSLOTS)alGetProcAddress("alDeleteAuxiliaryEffectSlots");
    alIsAuxiliaryEffectSlot = (LPALISAUXILIARYEFFECTSLOT)alGetProcAddress("alIsAuxiliaryEffectSlot");
    alAuxiliaryEffectSloti = (LPALAUXILIARYEFFECTSLOTI)alGetProcAddress("alAuxiliaryEffectSloti");
    alAuxiliaryEffectSlotiv = (LPALAUXILIARYEFFECTSLOTIV)alGetProcAddress("alAuxiliaryEffectSlotiv");
    alAuxiliaryEffectSlotf = (LPALAUXILIARYEFFECTSLOTF)alGetProcAddress("alAuxiliaryEffectSlotf");
    alAuxiliaryEffectSlotfv = (LPALAUXILIARYEFFECTSLOTFV)alGetProcAddress("alAuxiliaryEffectSlotfv");
    alGetAuxiliaryEffectSloti = (LPALGETAUXILIARYEFFECTSLOTI)alGetProcAddress("alGetAuxiliaryEffectSloti");
    alGetAuxiliaryEffectSlotiv = (LPALGETAUXILIARYEFFECTSLOTIV)alGetProcAddress("alGetAuxiliaryEffectSlotiv");
    alGetAuxiliaryEffectSlotf = (LPALGETAUXILIARYEFFECTSLOTF)alGetProcAddress("alGetAuxiliaryEffectSlotf");
    alGetAuxiliaryEffectSlotfv = (LPALGETAUXILIARYEFFECTSLOTFV)alGetProcAddress("alGetAuxiliaryEffectSlotfv");

Declaration:

             // Effect objects
    LPALGENEFFECTS alGenEffects;
    LPALDELETEEFFECTS alDeleteEffects;
    LPALISEFFECT alIsEffect;
    LPALEFFECTI alEffecti;
    LPALEFFECTIV alEffectiv;
    LPALEFFECTF alEffectf;
    LPALEFFECTFV alEffectfv;
    LPALGETEFFECTI alGetEffecti;
    LPALGETEFFECTIV alGetEffectiv;
    LPALGETEFFECTF alGetEffectf;
    LPALGETEFFECTFV alGetEffectfv;

    //Filter objects
    LPALGENFILTERS alGenFilters;
    LPALDELETEFILTERS alDeleteFilters;
    LPALISFILTER alIsFilter;
    LPALFILTERI alFilteri;
    LPALFILTERIV alFilteriv;
    LPALFILTERF alFilterf;
    LPALFILTERFV alFilterfv;
    LPALGETFILTERI alGetFilteri;
    LPALGETFILTERIV alGetFilteriv;
    LPALGETFILTERF alGetFilterf;
    LPALGETFILTERFV alGetFilterfv;

    // Auxiliary slot object
    LPALGENAUXILIARYEFFECTSLOTS alGenAuxiliaryEffectSlots;
    LPALDELETEAUXILIARYEFFECTSLOTS alDeleteAuxiliaryEffectSlots;
    LPALISAUXILIARYEFFECTSLOT alIsAuxiliaryEffectSlot;
    LPALAUXILIARYEFFECTSLOTI alAuxiliaryEffectSloti;
    LPALAUXILIARYEFFECTSLOTIV alAuxiliaryEffectSlotiv;
    LPALAUXILIARYEFFECTSLOTF alAuxiliaryEffectSlotf;
    LPALAUXILIARYEFFECTSLOTFV alAuxiliaryEffectSlotfv;
    LPALGETAUXILIARYEFFECTSLOTI alGetAuxiliaryEffectSloti;
    LPALGETAUXILIARYEFFECTSLOTIV alGetAuxiliaryEffectSlotiv;
    LPALGETAUXILIARYEFFECTSLOTF alGetAuxiliaryEffectSlotf;
    LPALGETAUXILIARYEFFECTSLOTFV alGetAuxiliaryEffectSlotfv;
E70f63aceb25fa57bee707b4edbef0c1
0
L1zb3th 101 Aug 21, 2007 at 16:16

i will check that \^\^
i think the Context was initialized =/
umhhhhh….
i will see what happen \^\^
Au Revoir !

EDIT: i forgot, Skaldi, thank you so much \^\^

0ce469221f4bbea25359910270be876a
0
Skaldi 101 Aug 22, 2007 at 13:02

Hello L1zb3th!

Did u have luck with alGetProcAddress?

Happy Coding
Skaldi