From: ratchov Date: Sat, 16 May 2015 19:27:53 +0000 (+0000) Subject: Call slot_stop() after the play buffer is drained to properly cleanup X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6d8665a7c07945b9df3e6fe6b636881888616493;p=openbsd Call slot_stop() after the play buffer is drained to properly cleanup the slot. Fixes periodic glitches occurring after eof is reached, and then playback restarted with a MMC-relocate and MMC-start. --- diff --git a/usr.bin/aucat/aucat.c b/usr.bin/aucat/aucat.c index e62ac2fd407..ab52872949b 100644 --- a/usr.bin/aucat/aucat.c +++ b/usr.bin/aucat/aucat.c @@ -917,13 +917,13 @@ slot_list_mix(unsigned int round, unsigned int pchan, adata_t *pbuf) if (s->pstate == SLOT_INIT || !(s->mode & SIO_PLAY)) continue; if (s->pstate == SLOT_STOP && s->buf.used < s->bpf) { - s->pstate = SLOT_INIT; #ifdef DEBUG if (log_level >= 3) { slot_log(s); log_puts(": drained, done\n"); } #endif + slot_stop(s); continue; } n = slot_mix_badd(s, dev_pbuf);