Remove unneeded variables
This commit is contained in:
parent
a8973514ba
commit
1dcd538ad9
@ -59,9 +59,7 @@ typedef struct ALsource
|
|||||||
|
|
||||||
struct ALbufferlistitem *queue; // Linked list of buffers in queue
|
struct ALbufferlistitem *queue; // Linked list of buffers in queue
|
||||||
ALuint BuffersInQueue; // Number of buffers in queue
|
ALuint BuffersInQueue; // Number of buffers in queue
|
||||||
|
ALuint BuffersPlayed; // Number of buffers played on this loop
|
||||||
ALuint TotalBufferDataSize; // Total amount of data contained in the buffers queued for this source
|
|
||||||
ALuint BuffersPlayed; // Number of buffers played on this loop
|
|
||||||
|
|
||||||
ALfilter DirectFilter;
|
ALfilter DirectFilter;
|
||||||
|
|
||||||
|
@ -1724,8 +1724,6 @@ ALAPI ALvoid ALAPIENTRY alSourceQueueBuffers( ALuint source, ALsizei n, const AL
|
|||||||
ALsizei i;
|
ALsizei i;
|
||||||
ALbufferlistitem *ALBufferList;
|
ALbufferlistitem *ALBufferList;
|
||||||
ALbufferlistitem *ALBufferListStart;
|
ALbufferlistitem *ALBufferListStart;
|
||||||
ALuint DataSize;
|
|
||||||
ALuint BufferSize;
|
|
||||||
ALint iFrequency;
|
ALint iFrequency;
|
||||||
ALint iFormat;
|
ALint iFormat;
|
||||||
ALboolean bBuffersValid = AL_TRUE;
|
ALboolean bBuffersValid = AL_TRUE;
|
||||||
@ -1738,9 +1736,6 @@ ALAPI ALvoid ALAPIENTRY alSourceQueueBuffers( ALuint source, ALsizei n, const AL
|
|||||||
{
|
{
|
||||||
SuspendContext(Context);
|
SuspendContext(Context);
|
||||||
|
|
||||||
DataSize = 0;
|
|
||||||
BufferSize = 0;
|
|
||||||
|
|
||||||
// Check that all buffers are valid or zero and that the source is valid
|
// Check that all buffers are valid or zero and that the source is valid
|
||||||
|
|
||||||
// Check that this is a valid source
|
// 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->flag = 0;
|
||||||
ALBufferListStart->next = NULL;
|
ALBufferListStart->next = NULL;
|
||||||
|
|
||||||
if (buffers[0])
|
|
||||||
BufferSize = ((ALbuffer*)ALTHUNK_LOOKUPENTRY(buffers[0]))->size;
|
|
||||||
else
|
|
||||||
BufferSize = 0;
|
|
||||||
|
|
||||||
DataSize += BufferSize;
|
|
||||||
|
|
||||||
// Increment reference counter for buffer
|
// Increment reference counter for buffer
|
||||||
if (buffers[0])
|
if (buffers[0])
|
||||||
((ALbuffer*)(ALTHUNK_LOOKUPENTRY(buffers[0])))->refcount++;
|
((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->flag = 0;
|
||||||
ALBufferList->next->next = NULL;
|
ALBufferList->next->next = NULL;
|
||||||
|
|
||||||
if (buffers[i])
|
|
||||||
BufferSize = ((ALbuffer*)ALTHUNK_LOOKUPENTRY(buffers[i]))->size;
|
|
||||||
else
|
|
||||||
BufferSize = 0;
|
|
||||||
|
|
||||||
DataSize += BufferSize;
|
|
||||||
|
|
||||||
// Increment reference counter for buffer
|
// Increment reference counter for buffer
|
||||||
if (buffers[i])
|
if (buffers[i])
|
||||||
((ALbuffer*)(ALTHUNK_LOOKUPENTRY(buffers[i])))->refcount++;
|
((ALbuffer*)(ALTHUNK_LOOKUPENTRY(buffers[i])))->refcount++;
|
||||||
@ -1899,16 +1880,12 @@ ALAPI ALvoid ALAPIENTRY alSourceUnqueueBuffers( ALuint source, ALsizei n, ALuint
|
|||||||
ALsource *ALSource;
|
ALsource *ALSource;
|
||||||
ALsizei i;
|
ALsizei i;
|
||||||
ALbufferlistitem *ALBufferList;
|
ALbufferlistitem *ALBufferList;
|
||||||
ALuint DataSize;
|
|
||||||
ALuint BufferSize;
|
|
||||||
ALuint BufferID;
|
ALuint BufferID;
|
||||||
ALboolean bBuffersProcessed;
|
ALboolean bBuffersProcessed;
|
||||||
|
|
||||||
if (n == 0)
|
if (n == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
DataSize = 0;
|
|
||||||
BufferSize = 0;
|
|
||||||
bBuffersProcessed = AL_TRUE;
|
bBuffersProcessed = AL_TRUE;
|
||||||
|
|
||||||
Context=alcGetCurrentContext();
|
Context=alcGetCurrentContext();
|
||||||
@ -1948,13 +1925,7 @@ ALAPI ALvoid ALAPIENTRY alSourceUnqueueBuffers( ALuint source, ALsizei n, ALuint
|
|||||||
// Decrement buffer reference counter
|
// Decrement buffer reference counter
|
||||||
if (ALBufferList->buffer)
|
if (ALBufferList->buffer)
|
||||||
((ALbuffer*)(ALTHUNK_LOOKUPENTRY(ALBufferList->buffer)))->refcount--;
|
((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
|
// Release memory for buffer list item
|
||||||
free(ALBufferList);
|
free(ALBufferList);
|
||||||
ALSource->BuffersInQueue--;
|
ALSource->BuffersInQueue--;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user