Rename some struct members for consistency

This commit is contained in:
Chris Robinson 2010-03-16 15:37:41 -07:00
parent 89d84131a4
commit ec917e8e2f
9 changed files with 52 additions and 52 deletions

View File

@ -1291,7 +1291,7 @@ ALCAPI ALCcontext* ALCAPIENTRY alcCreateContext(ALCdevice *device, const ALCint
ALsource *source; ALsource *source;
SuspendContext(context); SuspendContext(context);
for(slot = context->AuxiliaryEffectSlot;slot != NULL;slot = slot->next) for(slot = context->EffectSlotList;slot != NULL;slot = slot->next)
{ {
if(!slot->EffectState) if(!slot->EffectState)
continue; continue;
@ -1308,7 +1308,7 @@ ALCAPI ALCcontext* ALCAPIENTRY alcCreateContext(ALCdevice *device, const ALCint
ALEffect_Update(slot->EffectState, context, &slot->effect); ALEffect_Update(slot->EffectState, context, &slot->effect);
} }
for(source = context->Source;source != NULL;source = source->next) for(source = context->SourceList;source != NULL;source = source->next)
{ {
ALuint s = device->NumAuxSends; ALuint s = device->NumAuxSends;
while(s < MAX_SENDS) while(s < MAX_SENDS)
@ -1415,10 +1415,10 @@ ALCAPI ALCvoid ALCAPIENTRY alcDestroyContext(ALCcontext *context)
#endif #endif
ReleaseALSources(context); ReleaseALSources(context);
} }
if(context->AuxiliaryEffectSlotCount > 0) if(context->EffectSlotCount > 0)
{ {
#ifdef _DEBUG #ifdef _DEBUG
AL_PRINT("alcDestroyContext(): deleting %d AuxiliaryEffectSlot(s)\n", context->AuxiliaryEffectSlotCount); AL_PRINT("alcDestroyContext(): deleting %d AuxiliaryEffectSlot(s)\n", context->EffectSlotCount);
#endif #endif
ReleaseALAuxiliaryEffectSlots(context); ReleaseALAuxiliaryEffectSlots(context);
} }

View File

@ -900,7 +900,7 @@ static void MixSomeSources(ALCcontext *ALContext, float (*DryBuffer)[OUTPUTCHANN
ALfloat Pitch; ALfloat Pitch;
ALenum State; ALenum State;
if(!(ALSource=ALContext->Source)) if(!(ALSource=ALContext->SourceList))
return; return;
DeviceFreq = ALContext->Device->Frequency; DeviceFreq = ALContext->Device->Frequency;
@ -1357,7 +1357,7 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size)
MixSomeSources(ALContext, DryBuffer, SamplesToDo); MixSomeSources(ALContext, DryBuffer, SamplesToDo);
/* effect slot processing */ /* effect slot processing */
ALEffectSlot = ALContext->AuxiliaryEffectSlot; ALEffectSlot = ALContext->EffectSlotList;
while(ALEffectSlot) while(ALEffectSlot)
{ {
if(ALEffectSlot->EffectState) if(ALEffectSlot->EffectState)
@ -1491,7 +1491,7 @@ ALvoid aluHandleDisconnect(ALCdevice *device)
SuspendContext(device->Contexts[i]); SuspendContext(device->Contexts[i]);
source = device->Contexts[i]->Source; source = device->Contexts[i]->SourceList;
while(source) while(source)
{ {
if(source->state == AL_PLAYING) if(source->state == AL_PLAYING)

View File

@ -250,20 +250,20 @@ struct ALCdevice_struct
ALuint NumAuxSends; ALuint NumAuxSends;
// Linked List of Buffers for this device // Linked List of Buffers for this device
struct ALbuffer *Buffers; struct ALbuffer *BufferList;
ALuint BufferCount; ALuint BufferCount;
// Linked List of Effects for this device // Linked List of Effects for this device
struct ALeffect *EffectList; struct ALeffect *EffectList;
ALuint EffectCount; ALuint EffectCount;
// Linked List of Filters for this device // Linked List of Filters for this device
struct ALfilter *FilterList; struct ALfilter *FilterList;
ALuint FilterCount; ALuint FilterCount;
// Linked List of Databuffers for this device // Linked List of Databuffers for this device
struct ALdatabuffer *Databuffers; struct ALdatabuffer *DatabufferList;
ALuint DatabufferCount; ALuint DatabufferCount;
// Stereo-to-binaural filter // Stereo-to-binaural filter
struct bs2b *Bs2b; struct bs2b *Bs2b;
@ -302,11 +302,11 @@ struct ALCcontext_struct
{ {
ALlistener Listener; ALlistener Listener;
struct ALsource *Source; struct ALsource *SourceList;
ALuint SourceCount; ALuint SourceCount;
struct ALeffectslot *AuxiliaryEffectSlot; struct ALeffectslot *EffectSlotList;
ALuint AuxiliaryEffectSlotCount; ALuint EffectSlotCount;
struct ALdatabuffer *SampleSource; struct ALdatabuffer *SampleSource;
struct ALdatabuffer *SampleSink; struct ALdatabuffer *SampleSink;

View File

@ -47,12 +47,12 @@ ALvoid AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslots)
{ {
ALCdevice *Device = Context->Device; ALCdevice *Device = Context->Device;
if(Context->AuxiliaryEffectSlotCount+n <= Device->AuxiliaryEffectSlotMax) if(Context->EffectSlotCount+n <= Device->AuxiliaryEffectSlotMax)
{ {
// Check that enough memory has been allocted in the 'effectslots' array for n Effect Slots // Check that enough memory has been allocted in the 'effectslots' array for n Effect Slots
if (!IsBadWritePtr((void*)effectslots, n * sizeof(ALuint))) if (!IsBadWritePtr((void*)effectslots, n * sizeof(ALuint)))
{ {
ALeffectslot **list = &Context->AuxiliaryEffectSlot; ALeffectslot **list = &Context->EffectSlotList;
while(*list) while(*list)
list = &(*list)->next; list = &(*list)->next;
@ -78,7 +78,7 @@ ALvoid AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslots)
effectslots[i] = (ALuint)ALTHUNK_ADDENTRY(*list); effectslots[i] = (ALuint)ALTHUNK_ADDENTRY(*list);
(*list)->effectslot = effectslots[i]; (*list)->effectslot = effectslots[i];
Context->AuxiliaryEffectSlotCount++; Context->EffectSlotCount++;
i++; i++;
list = &(*list)->next; list = &(*list)->next;
@ -135,7 +135,7 @@ ALvoid AL_APIENTRY alDeleteAuxiliaryEffectSlots(ALsizei n, ALuint *effectslots)
ALAuxiliaryEffectSlot = ((ALeffectslot*)ALTHUNK_LOOKUPENTRY(effectslots[i])); ALAuxiliaryEffectSlot = ((ALeffectslot*)ALTHUNK_LOOKUPENTRY(effectslots[i]));
// Remove Source from list of Sources // Remove Source from list of Sources
list = &Context->AuxiliaryEffectSlot; list = &Context->EffectSlotList;
while(*list && *list != ALAuxiliaryEffectSlot) while(*list && *list != ALAuxiliaryEffectSlot)
list = &(*list)->next; list = &(*list)->next;
@ -149,7 +149,7 @@ ALvoid AL_APIENTRY alDeleteAuxiliaryEffectSlots(ALsizei n, ALuint *effectslots)
memset(ALAuxiliaryEffectSlot, 0, sizeof(ALeffectslot)); memset(ALAuxiliaryEffectSlot, 0, sizeof(ALeffectslot));
free(ALAuxiliaryEffectSlot); free(ALAuxiliaryEffectSlot);
Context->AuxiliaryEffectSlotCount--; Context->EffectSlotCount--;
} }
} }
} }
@ -168,7 +168,7 @@ ALboolean AL_APIENTRY alIsAuxiliaryEffectSlot(ALuint effectslot)
Context = GetContextSuspended(); Context = GetContextSuspended();
if(!Context) return AL_FALSE; if(!Context) return AL_FALSE;
list = &Context->AuxiliaryEffectSlot; list = &Context->EffectSlotList;
while(*list && (*list)->effectslot != effectslot) while(*list && (*list)->effectslot != effectslot)
list = &(*list)->next; list = &(*list)->next;
@ -224,7 +224,7 @@ ALvoid AL_APIENTRY alAuxiliaryEffectSloti(ALuint effectslot, ALenum param, ALint
// sending parameters // sending parameters
if(updateSources) if(updateSources)
{ {
ALsource *source = Context->Source; ALsource *source = Context->SourceList;
while(source) while(source)
{ {
ALuint i; ALuint i;
@ -517,10 +517,10 @@ static ALvoid InitializeEffect(ALCcontext *Context, ALeffectslot *ALEffectSlot,
ALvoid ReleaseALAuxiliaryEffectSlots(ALCcontext *Context) ALvoid ReleaseALAuxiliaryEffectSlots(ALCcontext *Context)
{ {
while(Context->AuxiliaryEffectSlot) while(Context->EffectSlotList)
{ {
ALeffectslot *temp = Context->AuxiliaryEffectSlot; ALeffectslot *temp = Context->EffectSlotList;
Context->AuxiliaryEffectSlot = Context->AuxiliaryEffectSlot->next; Context->EffectSlotList = temp->next;
// Release effectslot structure // Release effectslot structure
if(temp->EffectState) if(temp->EffectState)
@ -530,5 +530,5 @@ ALvoid ReleaseALAuxiliaryEffectSlots(ALCcontext *Context)
memset(temp, 0, sizeof(ALeffectslot)); memset(temp, 0, sizeof(ALeffectslot));
free(temp); free(temp);
} }
Context->AuxiliaryEffectSlotCount = 0; Context->EffectSlotCount = 0;
} }

View File

@ -118,7 +118,7 @@ ALAPI ALvoid ALAPIENTRY alGenBuffers(ALsizei n,ALuint *puiBuffers)
// Check the pointer is valid (and points to enough memory to store Buffer Names) // Check the pointer is valid (and points to enough memory to store Buffer Names)
if (!IsBadWritePtr((void*)puiBuffers, n * sizeof(ALuint))) if (!IsBadWritePtr((void*)puiBuffers, n * sizeof(ALuint)))
{ {
ALbuffer **list = &device->Buffers; ALbuffer **list = &device->BufferList;
while(*list) while(*list)
list = &(*list)->next; list = &(*list)->next;
@ -205,7 +205,7 @@ ALAPI ALvoid ALAPIENTRY alDeleteBuffers(ALsizei n, const ALuint *puiBuffers)
{ {
if (puiBuffers[i] && alIsBuffer(puiBuffers[i])) if (puiBuffers[i] && alIsBuffer(puiBuffers[i]))
{ {
ALbuffer **list = &device->Buffers; ALbuffer **list = &device->BufferList;
ALBuf=((ALbuffer *)ALTHUNK_LOOKUPENTRY(puiBuffers[i])); ALBuf=((ALbuffer *)ALTHUNK_LOOKUPENTRY(puiBuffers[i]));
while(*list && *list != ALBuf) while(*list && *list != ALBuf)
@ -254,7 +254,7 @@ ALAPI ALboolean ALAPIENTRY alIsBuffer(ALuint uiBuffer)
TgtALBuf = (ALbuffer *)ALTHUNK_LOOKUPENTRY(uiBuffer); TgtALBuf = (ALbuffer *)ALTHUNK_LOOKUPENTRY(uiBuffer);
// Check through list of generated buffers for uiBuffer // Check through list of generated buffers for uiBuffer
ALBuf = device->Buffers; ALBuf = device->BufferList;
while (ALBuf) while (ALBuf)
{ {
if (ALBuf == TgtALBuf) if (ALBuf == TgtALBuf)
@ -1263,7 +1263,7 @@ ALvoid ReleaseALBuffers(ALCdevice *device)
ALbuffer *ALBuffer; ALbuffer *ALBuffer;
ALbuffer *ALBufferTemp; ALbuffer *ALBufferTemp;
ALBuffer = device->Buffers; ALBuffer = device->BufferList;
while(ALBuffer) while(ALBuffer)
{ {
// Release sample data // Release sample data
@ -1275,6 +1275,6 @@ ALvoid ReleaseALBuffers(ALCdevice *device)
memset(ALBufferTemp, 0, sizeof(ALbuffer)); memset(ALBufferTemp, 0, sizeof(ALbuffer));
free(ALBufferTemp); free(ALBufferTemp);
} }
device->Buffers = NULL; device->BufferList = NULL;
device->BufferCount = 0; device->BufferCount = 0;
} }

View File

@ -54,7 +54,7 @@ ALvoid ALAPIENTRY alGenDatabuffersEXT(ALsizei n,ALuint *puiBuffers)
* Databuffer Names) */ * Databuffer Names) */
if(!IsBadWritePtr((void*)puiBuffers, n * sizeof(ALuint))) if(!IsBadWritePtr((void*)puiBuffers, n * sizeof(ALuint)))
{ {
ALdatabuffer **list = &device->Databuffers; ALdatabuffer **list = &device->DatabufferList;
while(*list) while(*list)
list = &(*list)->next; list = &(*list)->next;
@ -140,7 +140,7 @@ ALvoid ALAPIENTRY alDeleteDatabuffersEXT(ALsizei n, const ALuint *puiBuffers)
{ {
if(puiBuffers[i] && alIsDatabufferEXT(puiBuffers[i])) if(puiBuffers[i] && alIsDatabufferEXT(puiBuffers[i]))
{ {
ALdatabuffer **list = &device->Databuffers; ALdatabuffer **list = &device->DatabufferList;
ALBuf = (ALdatabuffer*)ALTHUNK_LOOKUPENTRY(puiBuffers[i]); ALBuf = (ALdatabuffer*)ALTHUNK_LOOKUPENTRY(puiBuffers[i]);
while(*list && *list != ALBuf) while(*list && *list != ALBuf)
@ -186,7 +186,7 @@ ALboolean ALAPIENTRY alIsDatabufferEXT(ALuint uiBuffer)
if(!Context) return AL_FALSE; if(!Context) return AL_FALSE;
/* Check through list of generated databuffers for uiBuffer */ /* Check through list of generated databuffers for uiBuffer */
ALBuf = Context->Device->Databuffers; ALBuf = Context->Device->DatabufferList;
while(ALBuf && ALBuf->databuffer != uiBuffer) while(ALBuf && ALBuf->databuffer != uiBuffer)
ALBuf = ALBuf->next; ALBuf = ALBuf->next;
@ -619,7 +619,7 @@ ALvoid ReleaseALDatabuffers(ALCdevice *device)
ALdatabuffer *ALBuffer; ALdatabuffer *ALBuffer;
ALdatabuffer *ALBufferTemp; ALdatabuffer *ALBufferTemp;
ALBuffer = device->Databuffers; ALBuffer = device->DatabufferList;
while(ALBuffer) while(ALBuffer)
{ {
// Release sample data // Release sample data
@ -631,6 +631,6 @@ ALvoid ReleaseALDatabuffers(ALCdevice *device)
memset(ALBufferTemp, 0, sizeof(ALdatabuffer)); memset(ALBufferTemp, 0, sizeof(ALdatabuffer));
free(ALBufferTemp); free(ALBufferTemp);
} }
device->Databuffers = NULL; device->DatabufferList = NULL;
device->DatabufferCount = 0; device->DatabufferCount = 0;
} }

View File

@ -65,7 +65,7 @@ ALAPI ALvoid ALAPIENTRY alListenerf(ALenum eParam, ALfloat flValue)
// relative sources are affected // relative sources are affected
if(updateAll) if(updateAll)
{ {
ALsource *source = pContext->Source; ALsource *source = pContext->SourceList;
while(source) while(source)
{ {
source->NeedsUpdate = AL_TRUE; source->NeedsUpdate = AL_TRUE;
@ -108,7 +108,7 @@ ALAPI ALvoid ALAPIENTRY alListener3f(ALenum eParam, ALfloat flValue1, ALfloat fl
if(updateWorld) if(updateWorld)
{ {
ALsource *source = pContext->Source; ALsource *source = pContext->SourceList;
while(source) while(source)
{ {
if(!source->bHeadRelative) if(!source->bHeadRelative)
@ -164,7 +164,7 @@ ALAPI ALvoid ALAPIENTRY alListenerfv(ALenum eParam, const ALfloat *pflValues)
if(updateWorld) if(updateWorld)
{ {
ALsource *source = pContext->Source; ALsource *source = pContext->SourceList;
while(source) while(source)
{ {
if(!source->bHeadRelative) if(!source->bHeadRelative)

View File

@ -56,7 +56,7 @@ ALAPI ALvoid ALAPIENTRY alGenSources(ALsizei n,ALuint *sources)
// Check that the requested number of sources can be generated // Check that the requested number of sources can be generated
if((Context->SourceCount + n) <= Device->MaxNoOfSources) if((Context->SourceCount + n) <= Device->MaxNoOfSources)
{ {
ALsource **list = &Context->Source; ALsource **list = &Context->SourceList;
while(*list) while(*list)
list = &(*list)->next; list = &(*list)->next;
@ -161,7 +161,7 @@ ALAPI ALvoid ALAPIENTRY alDeleteSources(ALsizei n, const ALuint *sources)
Context->SourceCount--; Context->SourceCount--;
// Remove Source from list of Sources // Remove Source from list of Sources
list = &Context->Source; list = &Context->SourceList;
while(*list && *list != ALSource) while(*list && *list != ALSource)
list = &(*list)->next; list = &(*list)->next;
@ -192,7 +192,7 @@ ALAPI ALboolean ALAPIENTRY alIsSource(ALuint source)
if(!Context) return AL_FALSE; if(!Context) return AL_FALSE;
// To determine if this is a valid Source name, look through the list of generated Sources // To determine if this is a valid Source name, look through the list of generated Sources
Source = Context->Source; Source = Context->SourceList;
while(Source) while(Source)
{ {
if(Source->source == source) if(Source->source == source)
@ -2137,10 +2137,10 @@ ALvoid ReleaseALSources(ALCcontext *Context)
{ {
ALuint j; ALuint j;
while(Context->Source) while(Context->SourceList)
{ {
ALsource *temp = Context->Source; ALsource *temp = Context->SourceList;
Context->Source = temp->next; Context->SourceList = temp->next;
// For each buffer in the source's queue, decrement its reference counter and remove it // For each buffer in the source's queue, decrement its reference counter and remove it
while(temp->queue != NULL) while(temp->queue != NULL)

View File

@ -63,7 +63,7 @@ ALAPI ALvoid ALAPIENTRY alEnable(ALenum capability)
if(updateSources) if(updateSources)
{ {
ALsource *source = Context->Source; ALsource *source = Context->SourceList;
while(source) while(source)
{ {
source->NeedsUpdate = AL_TRUE; source->NeedsUpdate = AL_TRUE;
@ -96,7 +96,7 @@ ALAPI ALvoid ALAPIENTRY alDisable(ALenum capability)
if(updateSources) if(updateSources)
{ {
ALsource *source = Context->Source; ALsource *source = Context->SourceList;
while(source) while(source)
{ {
source->NeedsUpdate = AL_TRUE; source->NeedsUpdate = AL_TRUE;
@ -552,7 +552,7 @@ ALAPI ALvoid ALAPIENTRY alDopplerFactor(ALfloat value)
// relative sources are affected // relative sources are affected
if(updateSources) if(updateSources)
{ {
ALsource *source = Context->Source; ALsource *source = Context->SourceList;
while(source) while(source)
{ {
source->NeedsUpdate = AL_TRUE; source->NeedsUpdate = AL_TRUE;
@ -581,7 +581,7 @@ ALAPI ALvoid ALAPIENTRY alDopplerVelocity(ALfloat value)
if(updateSources) if(updateSources)
{ {
ALsource *source = Context->Source; ALsource *source = Context->SourceList;
while(source) while(source)
{ {
source->NeedsUpdate = AL_TRUE; source->NeedsUpdate = AL_TRUE;
@ -610,7 +610,7 @@ ALAPI ALvoid ALAPIENTRY alSpeedOfSound(ALfloat flSpeedOfSound)
if(updateSources) if(updateSources)
{ {
ALsource *source = pContext->Source; ALsource *source = pContext->SourceList;
while(source) while(source)
{ {
source->NeedsUpdate = AL_TRUE; source->NeedsUpdate = AL_TRUE;
@ -649,7 +649,7 @@ ALAPI ALvoid ALAPIENTRY alDistanceModel(ALenum value)
if(updateSources) if(updateSources)
{ {
ALsource *source = Context->Source; ALsource *source = Context->SourceList;
while(source) while(source)
{ {
source->NeedsUpdate = AL_TRUE; source->NeedsUpdate = AL_TRUE;