=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/sndiod/dev.c,v retrieving revision 1.8 retrieving revision 1.9 diff -c -r1.8 -r1.9 *** src/usr.bin/sndiod/dev.c 2013/12/20 08:47:37 1.8 --- src/usr.bin/sndiod/dev.c 2013/12/31 12:27:49 1.9 *************** *** 1,4 **** ! /* $OpenBSD: dev.c,v 1.8 2013/12/20 08:47:37 ratchov Exp $ */ /* * Copyright (c) 2008-2012 Alexandre Ratchov * --- 1,4 ---- ! /* $OpenBSD: dev.c,v 1.9 2013/12/31 12:27:49 ratchov Exp $ */ /* * Copyright (c) 2008-2012 Alexandre Ratchov * *************** *** 1970,1975 **** --- 1970,1977 ---- void slot_write(struct slot *s) { + int drop; + if (s->pstate == SLOT_START && s->mix.buf.used == s->mix.buf.len) { #ifdef DEBUG if (log_level >= 4) { *************** *** 1980,1985 **** --- 1982,1999 ---- s->pstate = SLOT_READY; slot_ready(s); } + drop = s->mix.drop; + slot_mix_drop(s); + while (drop > s->mix.drop) { + #ifdef DEBUG + if (log_level >= 4) { + slot_log(s); + log_puts(": catching play block\n"); + } + #endif + s->ops->fill(s->arg); + drop--; + } } /* *************** *** 1988,1992 **** void slot_read(struct slot *s) { ! /* nothing yet */ } --- 2002,2019 ---- void slot_read(struct slot *s) { ! int sil; ! ! sil = s->sub.silence; ! slot_sub_sil(s); ! while (sil > s->sub.silence) { ! #ifdef DEBUG ! if (log_level >= 4) { ! slot_log(s); ! log_puts(": catching rec block\n"); ! } ! #endif ! s->ops->flush(s->arg); ! sil--; ! } }