alAuxEffectSlot.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #ifndef _AL_AUXEFFECTSLOT_H_
  2. #define _AL_AUXEFFECTSLOT_H_
  3. #include "AL/al.h"
  4. #include "alEffect.h"
  5. #include "alFilter.h"
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. typedef struct ALeffectState ALeffectState;
  10. typedef struct ALeffectslot
  11. {
  12. ALeffect effect;
  13. ALfloat Gain;
  14. ALboolean AuxSendAuto;
  15. ALeffectState *EffectState;
  16. ALfloat WetBuffer[BUFFERSIZE];
  17. ALuint refcount;
  18. // Index to itself
  19. ALuint effectslot;
  20. struct ALeffectslot *next;
  21. } ALeffectslot;
  22. ALvoid ReleaseALAuxiliaryEffectSlots(ALCcontext *Context);
  23. struct ALeffectState {
  24. ALvoid (*Destroy)(ALeffectState *State);
  25. ALboolean (*DeviceUpdate)(ALeffectState *State, ALCdevice *Device);
  26. ALvoid (*Update)(ALeffectState *State, ALCcontext *Context, const ALeffect *Effect);
  27. ALvoid (*Process)(ALeffectState *State, const ALeffectslot *Slot, ALuint SamplesToDo, const ALfloat *SamplesIn, ALfloat (*SamplesOut)[OUTPUTCHANNELS]);
  28. };
  29. ALeffectState *NoneCreate(void);
  30. ALeffectState *EAXVerbCreate(void);
  31. ALeffectState *VerbCreate(void);
  32. ALeffectState *EchoCreate(void);
  33. ALeffectState *ModulatorCreate(void);
  34. #define ALEffect_Destroy(a) ((a)->Destroy((a)))
  35. #define ALEffect_DeviceUpdate(a,b) ((a)->DeviceUpdate((a),(b)))
  36. #define ALEffect_Update(a,b,c) ((a)->Update((a),(b),(c)))
  37. #define ALEffect_Process(a,b,c,d,e) ((a)->Process((a),(b),(c),(d),(e)))
  38. #ifdef __cplusplus
  39. }
  40. #endif
  41. #endif