diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-11-11 16:55:09 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-11-11 16:55:09 +0000 |
commit | 7372f88dc171775c2918b3a874edf0a1d5266b19 (patch) | |
tree | 4b2eda389460737de0b50228f6b80c0bf2d97a68 /hw | |
parent | d7382233d8408b2b32809f3783a5083cce14f291 (diff) |
audio fixes (malc)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1133 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r-- | hw/sb16.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -640,8 +640,8 @@ static void complete (SB16State *s) s->freq = 11025; samples = dsp_get_lohi (s); bytes = samples << s->fmt_stereo << (s->fmt_bits == 16); - ticks = ticks_per_sec / (s->freq / bytes); - if (ticks < ticks_per_sec / 1024) + ticks = bytes ? (ticks_per_sec / (s->freq / bytes)) : 0; + if (!bytes || ticks < ticks_per_sec / 1024) pic_set_irq (s->irq, 1); else qemu_mod_timer (s->aux_ts, qemu_get_clock (vm_clock) + ticks); |