diff options
author | Chris Robinson <[email protected]> | 2014-07-06 03:27:39 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-07-06 03:27:39 -0700 |
commit | d0a64fe191aabe085cabe1737c44ff6a47a3d4d8 (patch) | |
tree | a22024a773333fd6beb4e1af95af5497477045bd /OpenAL32/alAuxEffectSlot.c | |
parent | 5de7271bcd4df9a26301a37ed9cf76ddc6641328 (diff) |
Don't require pre-declaring vector types
Diffstat (limited to 'OpenAL32/alAuxEffectSlot.c')
-rw-r--r-- | OpenAL32/alAuxEffectSlot.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/OpenAL32/alAuxEffectSlot.c b/OpenAL32/alAuxEffectSlot.c index 9f554cb0..ca1e1237 100644 --- a/OpenAL32/alAuxEffectSlot.c +++ b/OpenAL32/alAuxEffectSlot.c @@ -35,7 +35,7 @@ extern inline struct ALeffectslot *LookupEffectSlot(ALCcontext *context, ALuint id); extern inline struct ALeffectslot *RemoveEffectSlot(ALCcontext *context, ALuint id); -static ALenum AddEffectSlotArray(ALCcontext *Context, const_vector_ALeffectslotPtr slots); +static ALenum AddEffectSlotArray(ALCcontext *Context, ALeffectslot **start, ALsizei count); static void RemoveEffectSlotArray(ALCcontext *Context, const ALeffectslot *slot); @@ -52,7 +52,7 @@ static inline ALeffectStateFactory *getFactoryByType(ALenum type) AL_API ALvoid AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslots) { ALCcontext *context; - vector_ALeffectslotPtr slotvec; + VECTOR(ALeffectslot*) slotvec; ALsizei cur; ALenum err; @@ -94,7 +94,7 @@ AL_API ALvoid AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslo effectslots[cur] = slot->id; } - err = AddEffectSlotArray(context, slotvec); + err = AddEffectSlotArray(context, VECTOR_ITER_BEGIN(slotvec), n); if(err != AL_NO_ERROR) { alDeleteAuxiliaryEffectSlots(cur, effectslots); @@ -385,13 +385,12 @@ done: } -static ALenum AddEffectSlotArray(ALCcontext *context, const_vector_ALeffectslotPtr slots) +static ALenum AddEffectSlotArray(ALCcontext *context, ALeffectslot **start, ALsizei count) { ALenum err = AL_NO_ERROR; LockContext(context); - if(!VECTOR_INSERT(context->ActiveAuxSlots, VECTOR_ITER_END(context->ActiveAuxSlots), - VECTOR_ITER_BEGIN(slots), VECTOR_ITER_END(slots))) + if(!VECTOR_INSERT(context->ActiveAuxSlots, VECTOR_ITER_END(context->ActiveAuxSlots), start, start+count)) err = AL_OUT_OF_MEMORY; UnlockContext(context); |