aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-10-25 08:31:28 -0700
committerChris Robinson <[email protected]>2009-10-25 08:31:28 -0700
commita3fcd67a82c486e5409de5f6045f3147fb72179f (patch)
treede8b35550818eb616f495952bc347ac2a5dfef2d /Alc/ALu.c
parentfe3a43e2d4bbc20cea32a2046404d8eabe9240ee (diff)
Remove some unneeded buffer fields, make padding a constant amount
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index a782ac16..2eb8d182 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -957,7 +957,8 @@ another_source:
ALbuffer *NextBuf = BufferListItem->next->buffer;
if(NextBuf && NextBuf->data)
{
- ALuint ulExtraSamples = min(NextBuf->size, (ALint)(ALBuffer->padding*Channels*Bytes));
+ ALint ulExtraSamples = BUFFER_PADDING*Channels*Bytes;
+ ulExtraSamples = min(NextBuf->size, ulExtraSamples);
memcpy(&Data[DataSize*Channels], NextBuf->data, ulExtraSamples);
}
}
@@ -966,12 +967,13 @@ another_source:
ALbuffer *NextBuf = ALSource->queue->buffer;
if(NextBuf && NextBuf->data)
{
- ALuint ulExtraSamples = min(NextBuf->size, (ALint)(ALBuffer->padding*Channels*Bytes));
+ ALint ulExtraSamples = BUFFER_PADDING*Channels*Bytes;
+ ulExtraSamples = min(NextBuf->size, ulExtraSamples);
memcpy(&Data[DataSize*Channels], NextBuf->data, ulExtraSamples);
}
}
else
- memset(&Data[DataSize*Channels], 0, (ALBuffer->padding*Channels*Bytes));
+ memset(&Data[DataSize*Channels], 0, (BUFFER_PADDING*Channels*Bytes));
/* Compute the gain steps for each output channel */
for(i = 0;i < OUTPUTCHANNELS;i++)