summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2008-11-21 14:23:34 +0000
committerNils Wallménius <nils@rockbox.org>2008-11-21 14:23:34 +0000
commit7ef2a053b8082943f5626ec55e78d98ffa5c7820 (patch)
tree964c522f7add192e5cf4a0959843c9ef6b15b842
parent8a7c4af27c48588746508be5899d0b0e18932149 (diff)
downloadrockbox-7ef2a053b8082943f5626ec55e78d98ffa5c7820.zip
rockbox-7ef2a053b8082943f5626ec55e78d98ffa5c7820.tar.gz
rockbox-7ef2a053b8082943f5626ec55e78d98ffa5c7820.tar.bz2
rockbox-7ef2a053b8082943f5626ec55e78d98ffa5c7820.tar.xz
Turns out that using likely in the loop condition gives a nice little speedup to so let's do it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19168 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/midi/synth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/plugins/midi/synth.c b/apps/plugins/midi/synth.c
index bae6149..7e283d4 100644
--- a/apps/plugins/midi/synth.c
+++ b/apps/plugins/midi/synth.c
@@ -293,7 +293,7 @@ static inline void synthVoice(struct SynthObject * so, int32_t * out, unsigned i
const unsigned int start_loop = wf->startLoop << FRACTSIZE;
const int diff_loop = end_loop-start_loop;
- while(samples-- > 0)
+ while(likely(samples-- > 0))
{
/* Is voice being ramped? */
if(unlikely(so->state == STATE_RAMPDOWN))