aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-05-27 23:18:03 +0000
committerMax Horn2003-05-27 23:18:03 +0000
commit21b41a5456f65203cdde8619703e3452de645e49 (patch)
treeea13ca4473c5f10341c0017170bf2d25841108e2
parentbc290162bd01acfad205d91175a727d21e032fbe (diff)
downloadscummvm-rg350-21b41a5456f65203cdde8619703e3452de645e49.tar.gz
scummvm-rg350-21b41a5456f65203cdde8619703e3452de645e49.tar.bz2
scummvm-rg350-21b41a5456f65203cdde8619703e3452de645e49.zip
cleanup
svn-id: r8037
-rw-r--r--backends/midi/adlib.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/backends/midi/adlib.cpp b/backends/midi/adlib.cpp
index 743930f8f4..d7279b70ab 100644
--- a/backends/midi/adlib.cpp
+++ b/backends/midi/adlib.cpp
@@ -997,14 +997,16 @@ void MidiDriver_ADLIB::generate_samples(int16 *data, int len) {
step = _next_tick;
YM3812UpdateOne(0, data, step);
- if (!(_next_tick -= step)) {
+ _next_tick -= step;
+ if (!_next_tick) {
if (_timer_proc)
(*_timer_proc) (_timer_param);
on_timer();
reset_tick();
}
data += step;
- } while (len -= step);
+ len -= step;
+ } while (len);
}
void MidiDriver_ADLIB::reset_tick() {