diff options
author | Chris Robinson <[email protected]> | 2008-10-09 23:44:48 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2008-10-09 23:44:48 -0700 |
commit | bfa110778130bfdeacc79989d2d57adf170ef586 (patch) | |
tree | 18fe69f98e54a7dca9f581152dc641327c3632b5 /OpenAL32 | |
parent | 11397f76675adb7d6036821e3df2363c14913961 (diff) |
Remove unneeded source member variable
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alSource.h | 1 | ||||
-rw-r--r-- | OpenAL32/alSource.c | 9 |
2 files changed, 1 insertions, 9 deletions
diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h index 01c06b91..ffdd9f10 100644 --- a/OpenAL32/Include/alSource.h +++ b/OpenAL32/Include/alSource.h @@ -62,7 +62,6 @@ typedef struct ALsource ALuint TotalBufferDataSize; // Total amount of data contained in the buffers queued for this source ALuint BuffersPlayed; // Number of buffers played on this loop - ALuint BufferPosition; // Read position in audio data of current buffer ALfilter DirectFilter; diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index 61991b2e..799c18a9 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -1411,7 +1411,6 @@ ALAPI ALvoid ALAPIENTRY alSourcePlayv(ALsizei n, const ALuint *pSourceList) pSource->position = 0; pSource->position_fraction = 0; pSource->BuffersPlayed = 0; - pSource->BufferPosition = 0; pSource->lBytesPlayed = 0; pSource->ulBufferID = pSource->queue->buffer; @@ -1927,10 +1926,7 @@ ALAPI ALvoid ALAPIENTRY alSourceUnqueueBuffers( ALuint source, ALsizei n, ALuint } if((ALuint)n > ALSource->BuffersPlayed) - { ALSource->BuffersPlayed = 0; - ALSource->BufferPosition = 0; - } else ALSource->BuffersPlayed -= n; } @@ -2150,14 +2146,11 @@ static void ApplyOffset(ALsource *pSource, ALboolean bUpdateContext) // Set Current Buffer ID pSource->ulBufferID = pBufferList->buffer; - // Set current position in this buffer - pSource->BufferPosition = lByteOffset - lTotalBufferSize; - // Set Total Bytes Played to Offset pSource->lBytesPlayed = lByteOffset; // SW Mixer Positions are in Samples - pSource->position = pSource->BufferPosition / + pSource->position = (lByteOffset - lTotalBufferSize) / aluBytesFromFormat(pBuffer->format) / aluChannelsFromFormat(pBuffer->format); } |