Use powf when available
[openal-soft.git] / OpenAL32 / Include / alAuxEffectSlot.h
blob76a0f5373f13834360b00e403c76e9d52779a40d
1 #ifndef _AL_AUXEFFECTSLOT_H_
2 #define _AL_AUXEFFECTSLOT_H_
4 #include "AL/al.h"
5 #include "alEffect.h"
6 #include "alFilter.h"
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
12 #define AL_EFFECTSLOT_EFFECT 0x0001
13 #define AL_EFFECTSLOT_GAIN 0x0002
14 #define AL_EFFECTSLOT_AUXILIARY_SEND_AUTO 0x0003
16 #define AL_EFFECTSLOT_NULL 0x0000
18 typedef struct ALeffectState ALeffectState;
20 typedef struct ALeffectslot
22 ALeffect effect;
24 ALfloat Gain;
25 ALboolean AuxSendAuto;
27 ALeffectState *EffectState;
29 ALfloat WetBuffer[BUFFERSIZE];
31 ALuint refcount;
33 // Index to itself
34 ALuint effectslot;
36 struct ALeffectslot *next;
37 } ALeffectslot;
39 ALvoid AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslots);
40 ALvoid AL_APIENTRY alDeleteAuxiliaryEffectSlots(ALsizei n, ALuint *effectslots);
41 ALboolean AL_APIENTRY alIsAuxiliaryEffectSlot(ALuint effectslot);
43 ALvoid AL_APIENTRY alAuxiliaryEffectSloti(ALuint effectslot, ALenum param, ALint iValue);
44 ALvoid AL_APIENTRY alAuxiliaryEffectSlotiv(ALuint effectslot, ALenum param, ALint *piValues);
45 ALvoid AL_APIENTRY alAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat flValue);
46 ALvoid AL_APIENTRY alAuxiliaryEffectSlotfv(ALuint effectslot, ALenum param, ALfloat *pflValues);
48 ALvoid AL_APIENTRY alGetAuxiliaryEffectSloti(ALuint effectslot, ALenum param, ALint *piValue);
49 ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotiv(ALuint effectslot, ALenum param, ALint *piValues);
50 ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat *pflValue);
51 ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotfv(ALuint effectslot, ALenum param, ALfloat *pflValues);
53 ALvoid ReleaseALAuxiliaryEffectSlots(ALCcontext *Context);
56 struct ALeffectState {
57 ALvoid (*Destroy)(ALeffectState *State);
58 ALboolean (*DeviceUpdate)(ALeffectState *State, ALCdevice *Device);
59 ALvoid (*Update)(ALeffectState *State, ALCcontext *Context, const ALeffect *Effect);
60 ALvoid (*Process)(ALeffectState *State, const ALeffectslot *Slot, ALuint SamplesToDo, const ALfloat *SamplesIn, ALfloat (*SamplesOut)[OUTPUTCHANNELS]);
63 ALeffectState *NoneCreate(void);
64 ALeffectState *EAXVerbCreate(void);
65 ALeffectState *VerbCreate(void);
66 ALeffectState *EchoCreate(void);
68 #define ALEffect_Destroy(a) ((a)->Destroy((a)))
69 #define ALEffect_DeviceUpdate(a,b) ((a)->DeviceUpdate((a),(b)))
70 #define ALEffect_Update(a,b,c) ((a)->Update((a),(b),(c)))
71 #define ALEffect_Process(a,b,c,d,e) ((a)->Process((a),(b),(c),(d),(e)))
74 #ifdef __cplusplus
76 #endif
78 #endif