projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
ALSA: synth: emux: soundfont.c: divide by zero in calc_gus_envelope_time()
[linux-2.6-microblaze.git]
/
sound
/
synth
/
emux
/
soundfont.c
diff --git
a/sound/synth/emux/soundfont.c
b/sound/synth/emux/soundfont.c
index
31a4ea9
..
9b5d701
100644
(file)
--- a/
sound/synth/emux/soundfont.c
+++ b/
sound/synth/emux/soundfont.c
@@
-856,6
+856,8
@@
calc_gus_envelope_time(int rate, int start, int end)
int r, p, t;
r = (3 - ((rate >> 6) & 3)) * 3;
p = rate & 0x3f;
+ if (!p)
+ p = 1;
t = end - start;
if (t < 0) t = -t;
if (13 > r)