From 1dcd538ad93f226223c98d797d12e58cde2cabff Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 7 Jul 2009 21:01:41 -0700 Subject: Remove unneeded variables --- OpenAL32/Include/alSource.h | 4 +--- OpenAL32/alSource.c | 29 ----------------------------- 2 files changed, 1 insertion(+), 32 deletions(-) (limited to 'OpenAL32') diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h index 2bd7aac2..1002d077 100644 --- a/OpenAL32/Include/alSource.h +++ b/OpenAL32/Include/alSource.h @@ -59,9 +59,7 @@ typedef struct ALsource struct ALbufferlistitem *queue; // Linked list of buffers in queue ALuint BuffersInQueue; // Number of buffers in queue - - ALuint TotalBufferDataSize; // Total amount of data contained in the buffers queued for this source - ALuint BuffersPlayed; // Number of buffers played on this loop + ALuint BuffersPlayed; // Number of buffers played on this loop ALfilter DirectFilter; diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index b30cf666..9f28c9d1 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -1724,8 +1724,6 @@ ALAPI ALvoid ALAPIENTRY alSourceQueueBuffers( ALuint source, ALsizei n, const AL ALsizei i; ALbufferlistitem *ALBufferList; ALbufferlistitem *ALBufferListStart; - ALuint DataSize; - ALuint BufferSize; ALint iFrequency; ALint iFormat; ALboolean bBuffersValid = AL_TRUE; @@ -1738,9 +1736,6 @@ ALAPI ALvoid ALAPIENTRY alSourceQueueBuffers( ALuint source, ALsizei n, const AL { SuspendContext(Context); - DataSize = 0; - BufferSize = 0; - // Check that all buffers are valid or zero and that the source is valid // Check that this is a valid source @@ -1810,13 +1805,6 @@ ALAPI ALvoid ALAPIENTRY alSourceQueueBuffers( ALuint source, ALsizei n, const AL ALBufferListStart->flag = 0; ALBufferListStart->next = NULL; - if (buffers[0]) - BufferSize = ((ALbuffer*)ALTHUNK_LOOKUPENTRY(buffers[0]))->size; - else - BufferSize = 0; - - DataSize += BufferSize; - // Increment reference counter for buffer if (buffers[0]) ((ALbuffer*)(ALTHUNK_LOOKUPENTRY(buffers[0])))->refcount++; @@ -1831,13 +1819,6 @@ ALAPI ALvoid ALAPIENTRY alSourceQueueBuffers( ALuint source, ALsizei n, const AL ALBufferList->next->flag = 0; ALBufferList->next->next = NULL; - if (buffers[i]) - BufferSize = ((ALbuffer*)ALTHUNK_LOOKUPENTRY(buffers[i]))->size; - else - BufferSize = 0; - - DataSize += BufferSize; - // Increment reference counter for buffer if (buffers[i]) ((ALbuffer*)(ALTHUNK_LOOKUPENTRY(buffers[i])))->refcount++; @@ -1899,16 +1880,12 @@ ALAPI ALvoid ALAPIENTRY alSourceUnqueueBuffers( ALuint source, ALsizei n, ALuint ALsource *ALSource; ALsizei i; ALbufferlistitem *ALBufferList; - ALuint DataSize; - ALuint BufferSize; ALuint BufferID; ALboolean bBuffersProcessed; if (n == 0) return; - DataSize = 0; - BufferSize = 0; bBuffersProcessed = AL_TRUE; Context=alcGetCurrentContext(); @@ -1948,13 +1925,7 @@ ALAPI ALvoid ALAPIENTRY alSourceUnqueueBuffers( ALuint source, ALsizei n, ALuint // Decrement buffer reference counter if (ALBufferList->buffer) ((ALbuffer*)(ALTHUNK_LOOKUPENTRY(ALBufferList->buffer)))->refcount--; - // Record size of buffer - if (ALBufferList->buffer) - BufferSize = ((ALbuffer*)ALTHUNK_LOOKUPENTRY(ALBufferList->buffer))->size; - else - BufferSize = 0; - DataSize += BufferSize; // Release memory for buffer list item free(ALBufferList); ALSource->BuffersInQueue--; -- cgit v1.2.3