aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-08-16 14:53:21 -0700
committerChris Robinson <[email protected]>2010-08-16 14:53:21 -0700
commite5cae875020ceced4a62557c230bb58a67fbe036 (patch)
treebde1be117497e1123db891278c36a3309a21df1d /OpenAL32
parentba0ec1b4bac81fc636efb2881261dcf6516f85ba (diff)
Handle clicks by watching changes between updates
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alAuxEffectSlot.h1
-rw-r--r--OpenAL32/Include/alMain.h1
-rw-r--r--OpenAL32/alAuxEffectSlot.c3
3 files changed, 5 insertions, 0 deletions
diff --git a/OpenAL32/Include/alAuxEffectSlot.h b/OpenAL32/Include/alAuxEffectSlot.h
index eb7351b2..92165d62 100644
--- a/OpenAL32/Include/alAuxEffectSlot.h
+++ b/OpenAL32/Include/alAuxEffectSlot.h
@@ -23,6 +23,7 @@ typedef struct ALeffectslot
ALfloat WetBuffer[BUFFERSIZE];
ALfloat ClickRemoval[1];
+ ALfloat PendingClicks[1];
ALuint refcount;
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 1aa3d03e..e5193f70 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -410,6 +410,7 @@ struct ALCdevice_struct
ALuint NumChan;
ALfloat ClickRemoval[OUTPUTCHANNELS];
+ ALfloat PendingClicks[OUTPUTCHANNELS];
// Contexts created on this device
ALCcontext **Contexts;
diff --git a/OpenAL32/alAuxEffectSlot.c b/OpenAL32/alAuxEffectSlot.c
index a7ea0e32..d8ccaf71 100644
--- a/OpenAL32/alAuxEffectSlot.c
+++ b/OpenAL32/alAuxEffectSlot.c
@@ -89,7 +89,10 @@ AL_API ALvoid AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslo
for(j = 0;j < BUFFERSIZE;j++)
slot->WetBuffer[j] = 0.0f;
for(j = 0;j < 1;j++)
+ {
slot->ClickRemoval[j] = 0.0f;
+ slot->PendingClicks[j] = 0.0f;
+ }
slot->refcount = 0;
}
}