summaryrefslogtreecommitdiffstats
path: root/OpenAL32/alSource.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2008-10-09 23:44:48 -0700
committerChris Robinson <[email protected]>2008-10-09 23:44:48 -0700
commitbfa110778130bfdeacc79989d2d57adf170ef586 (patch)
tree18fe69f98e54a7dca9f581152dc641327c3632b5 /OpenAL32/alSource.c
parent11397f76675adb7d6036821e3df2363c14913961 (diff)
Remove unneeded source member variable
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r--OpenAL32/alSource.c9
1 files changed, 1 insertions, 8 deletions
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);
}