Implement an SSE MixSend method
[openal-soft.git] / OpenAL32 / Include / alAuxEffectSlot.h
blobcfa61a5f2c6499b5b54dbef1d34e4b17264b01fa
1 #ifndef _AL_AUXEFFECTSLOT_H_
2 #define _AL_AUXEFFECTSLOT_H_
4 #include "alMain.h"
5 #include "alEffect.h"
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
11 typedef struct ALeffectState {
12 ALvoid (*Destroy)(struct ALeffectState *State);
13 ALboolean (*DeviceUpdate)(struct ALeffectState *State, ALCdevice *Device);
14 ALvoid (*Update)(struct ALeffectState *State, ALCdevice *Device, const struct ALeffectslot *Slot);
15 ALvoid (*Process)(struct ALeffectState *State, ALuint SamplesToDo, const ALfloat *SamplesIn, ALfloat (*SamplesOut)[BUFFERSIZE]);
16 } ALeffectState;
19 typedef struct ALeffectslot
21 ALeffect effect;
23 volatile ALfloat Gain;
24 volatile ALboolean AuxSendAuto;
26 volatile ALenum NeedsUpdate;
27 ALeffectState *EffectState;
29 ALIGN(16) ALfloat WetBuffer[BUFFERSIZE];
31 ALfloat ClickRemoval[1];
32 ALfloat PendingClicks[1];
34 RefCount ref;
36 /* Self ID */
37 ALuint id;
38 } ALeffectslot;
41 ALenum InitEffectSlot(ALeffectslot *slot);
42 ALvoid ReleaseALAuxiliaryEffectSlots(ALCcontext *Context);
44 ALeffectState *NoneCreate(void);
45 ALeffectState *ReverbCreate(void);
46 ALeffectState *EchoCreate(void);
47 ALeffectState *ModulatorCreate(void);
48 ALeffectState *DedicatedCreate(void);
50 #define ALeffectState_Destroy(a) ((a)->Destroy((a)))
51 #define ALeffectState_DeviceUpdate(a,b) ((a)->DeviceUpdate((a),(b)))
52 #define ALeffectState_Update(a,b,c) ((a)->Update((a),(b),(c)))
53 #define ALeffectState_Process(a,b,c,d) ((a)->Process((a),(b),(c),(d)))
55 ALenum InitializeEffect(ALCdevice *Device, ALeffectslot *EffectSlot, ALeffect *effect);
57 #ifdef __cplusplus
59 #endif
61 #endif