aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-09-27 11:13:18 -0700
committerChris Robinson <[email protected]>2017-09-27 11:13:18 -0700
commit1ab890262168444c2f6e1a9d84c3d65e5afe37f5 (patch)
tree201157974888052def0b8c24cc3f61efa0ba0f8d /OpenAL32/Include
parentfd70b0bca6dcc97edf16d4567c84933576828230 (diff)
Re-update effect slots when context properties change
Also keep all free property update structs together in the context instead of per-object.
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r--OpenAL32/Include/alAuxEffectSlot.h8
-rw-r--r--OpenAL32/Include/alListener.h5
-rw-r--r--OpenAL32/Include/alMain.h12
-rw-r--r--OpenAL32/Include/alu.h1
4 files changed, 16 insertions, 10 deletions
diff --git a/OpenAL32/Include/alAuxEffectSlot.h b/OpenAL32/Include/alAuxEffectSlot.h
index fe05e008..908c72c5 100644
--- a/OpenAL32/Include/alAuxEffectSlot.h
+++ b/OpenAL32/Include/alAuxEffectSlot.h
@@ -110,13 +110,13 @@ typedef struct ALeffectslot {
RefCount ref;
ATOMIC(struct ALeffectslotProps*) Update;
- ATOMIC(struct ALeffectslotProps*) FreeList;
struct {
ALfloat Gain;
ALboolean AuxSendAuto;
ALenum EffectType;
+ ALeffectProps EffectProps;
ALeffectState *EffectState;
ALfloat RoomRolloff; /* Added to the source's room rolloff, not multiplied. */
@@ -160,7 +160,7 @@ inline struct ALeffectslot *RemoveEffectSlot(ALCcontext *context, ALuint id)
ALenum InitEffectSlot(ALeffectslot *slot);
void DeinitEffectSlot(ALeffectslot *slot);
-void UpdateEffectSlotProps(ALeffectslot *slot);
+void UpdateEffectSlotProps(ALeffectslot *slot, ALCcontext *context);
void UpdateAllEffectSlotProps(ALCcontext *context);
ALvoid ReleaseALAuxiliaryEffectSlots(ALCcontext *Context);
@@ -178,11 +178,13 @@ ALeffectStateFactory *ALmodulatorStateFactory_getFactory(void);
ALeffectStateFactory *ALdedicatedStateFactory_getFactory(void);
-ALenum InitializeEffect(ALCdevice *Device, ALeffectslot *EffectSlot, ALeffect *effect);
+ALenum InitializeEffect(ALCcontext *Context, ALeffectslot *EffectSlot, ALeffect *effect);
void InitEffectFactoryMap(void);
void DeinitEffectFactoryMap(void);
+void ALeffectState_DecRef(ALeffectState *state);
+
#ifdef __cplusplus
}
#endif
diff --git a/OpenAL32/Include/alListener.h b/OpenAL32/Include/alListener.h
index 8b212d47..0d80a8d7 100644
--- a/OpenAL32/Include/alListener.h
+++ b/OpenAL32/Include/alListener.h
@@ -42,11 +42,6 @@ typedef struct ALlistener {
*/
ATOMIC(struct ALlistenerProps*) Update;
- /* A linked list of unused property containers, free to use for future
- * updates.
- */
- ATOMIC(struct ALlistenerProps*) FreeList;
-
struct {
aluMatrixf Matrix;
aluVector Velocity;
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 7ac7eb13..776fb37b 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -383,6 +383,9 @@ struct HrtfEntry;
struct FrontStablizer;
struct Compressor;
struct ALcontextProps;
+struct ALlistenerProps;
+struct ALvoiceProps;
+struct ALeffectslotProps;
#define DEFAULT_OUTPUT_RATE (44100)
@@ -868,7 +871,14 @@ struct ALCcontext_struct {
ALfloat GainBoost;
ATOMIC(struct ALcontextProps*) Update;
- ATOMIC(struct ALcontextProps*) FreeList;
+
+ /* Linked lists of unused property containers, free to use for future
+ * updates.
+ */
+ ATOMIC(struct ALcontextProps*) FreeContextProps;
+ ATOMIC(struct ALlistenerProps*) FreeListenerProps;
+ ATOMIC(struct ALvoiceProps*) FreeVoiceProps;
+ ATOMIC(struct ALeffectslotProps*) FreeEffectslotProps;
struct ALvoice **Voices;
ALsizei VoiceCount;
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index 2344cc6d..049a9dcd 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -251,7 +251,6 @@ typedef struct ALvoice {
struct ALvoiceProps *Props;
ATOMIC(struct ALvoiceProps*) Update;
- ATOMIC(struct ALvoiceProps*) FreeList;
ATOMIC(struct ALsource*) Source;
ATOMIC(bool) Playing;