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.tar.gz
rockbox-7ef2a053b8082943f5626ec55e78d98ffa5c7820.zip
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 bae6149860..7e283d4ef1 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
293 const unsigned int start_loop = wf->startLoop << FRACTSIZE; 293 const unsigned int start_loop = wf->startLoop << FRACTSIZE;
294 const int diff_loop = end_loop-start_loop; 294 const int diff_loop = end_loop-start_loop;
295 295
296 while(samples-- > 0) 296 while(likely(samples-- > 0))
297 { 297 {
298 /* Is voice being ramped? */ 298 /* Is voice being ramped? */
299 if(unlikely(so->state == STATE_RAMPDOWN)) 299 if(unlikely(so->state == STATE_RAMPDOWN))