From 21b41a5456f65203cdde8619703e3452de645e49 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 27 May 2003 23:18:03 +0000 Subject: cleanup svn-id: r8037 --- backends/midi/adlib.cpp | 6 ++++-- 1 file 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() { -- cgit v1.2.3