diff options
author | Chris Robinson <[email protected]> | 2009-10-25 08:31:28 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-10-25 08:31:28 -0700 |
commit | a3fcd67a82c486e5409de5f6045f3147fb72179f (patch) | |
tree | de8b35550818eb616f495952bc347ac2a5dfef2d /Alc | |
parent | fe3a43e2d4bbc20cea32a2046404d8eabe9240ee (diff) |
Remove some unneeded buffer fields, make padding a constant amount
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALu.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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++) |