diff options
author | Chris Robinson <[email protected]> | 2016-11-01 20:49:50 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-11-02 16:10:02 -0700 |
commit | 118cc0907d93d97439be15af07b2385e6865a6fe (patch) | |
tree | a5305087744aab91371bab59b4c55861f8b467a0 /Alc/mixer.c | |
parent | 2d5efe424faf9de692283279be11fe1399c1d5a8 (diff) |
Remove an unnecessary intermediate variable
Diffstat (limited to 'Alc/mixer.c')
-rw-r--r-- | Alc/mixer.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Alc/mixer.c b/Alc/mixer.c index b1f79d05..727d0640 100644 --- a/Alc/mixer.c +++ b/Alc/mixer.c @@ -455,7 +455,6 @@ ALvoid MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALuint Sam const ALbuffer *ALBuffer = BufferListItem->buffer; const ALubyte *Data = ALBuffer->data; ALuint DataSize; - ALuint pos; /* Offset buffer data to current channel */ Data += chan*SampleSize; @@ -467,10 +466,10 @@ ALvoid MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALuint Sam /* Load what's left to play from the source buffer, and * clear the rest of the temp buffer */ - pos = DataPosInt; - DataSize = minu(SrcBufferSize - SrcDataSize, ALBuffer->SampleLen - pos); + DataSize = minu(SrcBufferSize - SrcDataSize, + ALBuffer->SampleLen - DataPosInt); - LoadSamples(&SrcData[SrcDataSize], &Data[pos * NumChannels*SampleSize], + LoadSamples(&SrcData[SrcDataSize], &Data[DataPosInt * NumChannels*SampleSize], NumChannels, ALBuffer->FmtType, DataSize); SrcDataSize += DataSize; @@ -484,11 +483,10 @@ ALvoid MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALuint Sam /* Load what's left of this loop iteration, then load * repeats of the loop section */ - pos = DataPosInt; - DataSize = LoopEnd - pos; + DataSize = LoopEnd - DataPosInt; DataSize = minu(SrcBufferSize - SrcDataSize, DataSize); - LoadSamples(&SrcData[SrcDataSize], &Data[pos * NumChannels*SampleSize], + LoadSamples(&SrcData[SrcDataSize], &Data[DataPosInt * NumChannels*SampleSize], NumChannels, ALBuffer->FmtType, DataSize); SrcDataSize += DataSize; |