aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-10-19 07:46:53 -0700
committerChris Robinson <[email protected]>2009-10-19 07:46:53 -0700
commit6d1d61026d5c5ba75986c2cd8c499bcf72549197 (patch)
treebc23ed399f8694bdbf483eb7221f1a2b7b3982a9 /OpenAL32
parenta4e3ca933b036102b1aed623015d007869416c7b (diff)
Be context-agnostic in the effect Create functions
This allows the effect Update functions to handle the playback frequency being changed. By default the effects assume a maximum frequency of 192khz, however, it can go higher at the cost of the sample buffers being cleared and the risk of an abort() if reallocation fails
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alAuxEffectSlot.h8
-rw-r--r--OpenAL32/alAuxEffectSlot.c6
2 files changed, 7 insertions, 7 deletions
diff --git a/OpenAL32/Include/alAuxEffectSlot.h b/OpenAL32/Include/alAuxEffectSlot.h
index eb41132b..667d74dd 100644
--- a/OpenAL32/Include/alAuxEffectSlot.h
+++ b/OpenAL32/Include/alAuxEffectSlot.h
@@ -55,13 +55,13 @@ ALvoid ReleaseALAuxiliaryEffectSlots(ALCcontext *Context);
struct ALeffectState {
ALvoid (*Destroy)(ALeffectState *State);
- ALvoid (*Update)(ALeffectState *State, ALCcontext *Context, ALeffect *Effect);
+ ALvoid (*Update)(ALeffectState *State, ALCcontext *Context, const ALeffect *Effect);
ALvoid (*Process)(ALeffectState *State, const ALeffectslot *Slot, ALuint SamplesToDo, const ALfloat *SamplesIn, ALfloat (*SamplesOut)[OUTPUTCHANNELS]);
};
-ALeffectState *EAXVerbCreate(ALCcontext *Context);
-ALeffectState *VerbCreate(ALCcontext *Context);
-ALeffectState *EchoCreate(ALCcontext *Context);
+ALeffectState *EAXVerbCreate(void);
+ALeffectState *VerbCreate(void);
+ALeffectState *EchoCreate(void);
#define ALEffect_Destroy(a) ((a)->Destroy((a)))
#define ALEffect_Update(a,b,c) ((a)->Update((a),(b),(c)))
diff --git a/OpenAL32/alAuxEffectSlot.c b/OpenAL32/alAuxEffectSlot.c
index acefb624..1fd2f707 100644
--- a/OpenAL32/alAuxEffectSlot.c
+++ b/OpenAL32/alAuxEffectSlot.c
@@ -422,11 +422,11 @@ static ALvoid InitializeEffect(ALCcontext *Context, ALeffectslot *ALEffectSlot,
if(effect)
{
if(effect->type == AL_EFFECT_EAXREVERB)
- NewState = EAXVerbCreate(Context);
+ NewState = EAXVerbCreate();
else if(effect->type == AL_EFFECT_REVERB)
- NewState = VerbCreate(Context);
+ NewState = VerbCreate();
else if(effect->type == AL_EFFECT_ECHO)
- NewState = EchoCreate(Context);
+ NewState = EchoCreate();
/* No new state? An error occured.. */
if(!NewState)
return;