diff options
author | Nils Wallménius <nils@rockbox.org> | 2007-10-05 12:22:58 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2007-10-05 12:22:58 +0000 |
commit | 5118f48d73c00c2b3155b742c728b2c74e27b904 (patch) | |
tree | 8d86eff92b0528eaa3aa19c17ccbd5bd9719563f | |
parent | a26ccdebf3e3664fc6de8451d80d447216e284a0 (diff) | |
download | rockbox-5118f48d73c00c2b3155b742c728b2c74e27b904.tar.gz rockbox-5118f48d73c00c2b3155b742c728b2c74e27b904.zip |
A loop with one iteration is a little strange, also put it inside an #if block to not rely on gcc otimizing it away
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14990 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/plugins/midi/synth.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/plugins/midi/synth.h b/apps/plugins/midi/synth.h index dd52c40a7d..e04f9f4bd5 100644 --- a/apps/plugins/midi/synth.h +++ b/apps/plugins/midi/synth.h | |||
@@ -48,9 +48,9 @@ static inline void synthSample(int * mixL, int * mixR) | |||
48 | voicept++; | 48 | voicept++; |
49 | } | 49 | } |
50 | 50 | ||
51 | /* if max voices is an even number gcc is smart enough to not | 51 | /* if MAX_VOICES is not even we do this to get the last voice */ |
52 | include this loop */ | 52 | #if MAX_VOICES%2 |
53 | for(i=MAX_VOICES%2; i > 0; i--) | 53 | if (MAX_VOICES%2) |
54 | { | 54 | { |
55 | if(voicept->isUsed==1) | 55 | if(voicept->isUsed==1) |
56 | { | 56 | { |
@@ -59,8 +59,8 @@ static inline void synthSample(int * mixL, int * mixR) | |||
59 | sample *= chPan[voicept->ch]; | 59 | sample *= chPan[voicept->ch]; |
60 | dR += sample; | 60 | dR += sample; |
61 | } | 61 | } |
62 | voicept++; | ||
63 | } | 62 | } |
63 | #endif | ||
64 | 64 | ||
65 | dL = (dL << 7) - dR; | 65 | dL = (dL << 7) - dR; |
66 | 66 | ||