Skip to content
This repository has been archived by the owner on Sep 30, 2018. It is now read-only.

Commit

Permalink
[droid] changed SoftAE: do not manually unroll loops, let the optimiz…
Browse files Browse the repository at this point in the history
…er deal with it.
  • Loading branch information
Cory Fields committed Aug 3, 2012
1 parent 77459ee commit d931328
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
Expand Up @@ -1193,23 +1193,8 @@ unsigned int CSoftAE::RunStreamStage(unsigned int channelCount, void *out, bool
else
#endif
{
/* unrolled loop for performance */
unsigned int blocks = channelCount & ~0x3;
unsigned int i = 0;
for (i = 0; i < blocks; i += 4)
{
*dst++ += *frame++ * volume;
*dst++ += *frame++ * volume;
*dst++ += *frame++ * volume;
for (unsigned int i = 0; i < channelCount; ++i)
*dst++ += *frame++ * volume;
}

switch (channelCount & 0x3)
{
case 3: *dst++ += *frame++ * volume;
case 2: *dst++ += *frame++ * volume;
case 1: *dst += *frame++ * volume;
}
}

++mixed;
Expand Down

0 comments on commit d931328

Please sign in to comment.