diff options
author | Chris Robinson <[email protected]> | 2008-08-15 17:43:07 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2008-08-15 17:43:07 -0700 |
commit | db541f3cfa99b3b817f4aacde5a7f176afc464f9 (patch) | |
tree | 13863b45747b34bb98390e6c9647ee8a4444d310 /OpenAL32 | |
parent | 3e19ba6ca86758fa356094fab9e85c959421f73f (diff) |
Remove unneeded source struct member
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alSource.h | 2 | ||||
-rw-r--r-- | OpenAL32/alSource.c | 17 |
2 files changed, 5 insertions, 14 deletions
diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h index 42a1b915..976921f9 100644 --- a/OpenAL32/Include/alSource.h +++ b/OpenAL32/Include/alSource.h @@ -56,9 +56,9 @@ typedef struct ALsource ALenum state; ALuint position; ALuint position_fraction; + struct ALbufferlistitem *queue; // Linked list of buffers in queue ALuint BuffersInQueue; // Number of buffers in queue - ALuint BuffersProcessed; // Number of buffers already processed (played) ALuint TotalBufferDataSize; // Total amount of data contained in the buffers queued for this source ALuint BuffersPlayed; // Number of buffers played on this loop diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index d7be7f63..fa07751f 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -634,9 +634,6 @@ ALAPI ALvoid ALAPIENTRY alSourcei(ALuint source,ALenum eParam,ALint lValue) pSource->lSourceType = AL_UNDETERMINED; } - // Set Buffers Processed - pSource->BuffersProcessed = 0; - // Update AL_BUFFER parameter pSource->ulBufferID = lValue; } @@ -1157,7 +1154,7 @@ ALAPI ALvoid ALAPIENTRY alGetSourcei(ALuint source, ALenum eParam, ALint *plValu *plValue = 0; } else - *plValue = pSource->BuffersProcessed; + *plValue = pSource->BuffersPlayed; break; case AL_SOURCE_TYPE: @@ -1419,7 +1416,6 @@ ALAPI ALvoid ALAPIENTRY alSourcePlayv(ALsizei n, const ALuint *pSourceList) pSource->play = AL_TRUE; pSource->position = 0; pSource->position_fraction = 0; - pSource->BuffersProcessed = 0; pSource->BuffersPlayed = 0; pSource->BufferPosition = 0; pSource->lBytesPlayed = 0; @@ -1455,7 +1451,7 @@ ALAPI ALvoid ALAPIENTRY alSourcePlayv(ALsizei n, const ALuint *pSourceList) ALBufferList = ALBufferList->next; } - pSource->BuffersPlayed = pSource->BuffersProcessed = pSource->BuffersInQueue; + pSource->BuffersPlayed = pSource->BuffersInQueue; } } } @@ -1579,7 +1575,7 @@ ALAPI ALvoid ALAPIENTRY alSourceStopv(ALsizei n, const ALuint *sources) { Source->state=AL_STOPPED; Source->inuse=AL_FALSE; - Source->BuffersPlayed = Source->BuffersProcessed = Source->BuffersInQueue; + Source->BuffersPlayed = Source->BuffersInQueue; ALBufferListItem= Source->queue; while (ALBufferListItem != NULL) { @@ -1651,7 +1647,7 @@ ALAPI ALvoid ALAPIENTRY alSourceRewindv(ALsizei n, const ALuint *sources) Source->inuse=AL_FALSE; Source->position=0; Source->position_fraction=0; - Source->BuffersProcessed = 0; + Source->BuffersPlayed = 0; ALBufferListItem= Source->queue; while (ALBufferListItem != NULL) { @@ -1924,7 +1920,6 @@ ALAPI ALvoid ALAPIENTRY alSourceUnqueueBuffers( ALuint source, ALsizei n, ALuint // Release memory for buffer list item free(ALBufferList); ALSource->BuffersInQueue--; - ALSource->BuffersProcessed--; } if (ALSource->state != AL_PLAYING) @@ -2139,7 +2134,6 @@ static void ApplyOffset(ALsource *pSource, ALboolean bUpdateContext) pBufferList = pSource->queue; lTotalBufferSize = 0; pSource->BuffersPlayed = 0; - pSource->BuffersProcessed = 0; while (pBufferList) { pBuffer = ALTHUNK_LOOKUPENTRY(pBufferList->buffer); @@ -2152,10 +2146,7 @@ static void ApplyOffset(ALsource *pSource, ALboolean bUpdateContext) pSource->BuffersPlayed++; if (!pSource->bLooping) - { pBufferList->bufferstate = PROCESSED; - pSource->BuffersProcessed++; - } } else if (lTotalBufferSize <= lByteOffset) { |