From 529863cb719810caa17d77ef228a979406a21c6a Mon Sep 17 00:00:00 2001 From: Cameron Grant Date: Sun, 19 Dec 1999 22:32:55 +0000 Subject: [PATCH] stop playing if we underrun; if there is more data to come, the next write will restart --- sys/dev/sound/pcm/channel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 271c1a227507..48d2085663fe 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -347,6 +347,8 @@ chn_wrintr(pcm_channel *c) DEB(printf("cannot start wr-dma flags 0x%08x rp %d rl %d\n", c->flags, b->rp, b->rl)); if (b->dl) { /* DMA was active */ + chn_trigger(c, PCMTRIG_STOP); + b->dl = 0; b->underflow = 1; /* set underflow flag */ chn_clearbuf(c, b->bufsize); /* and clear all DMA buffer */ }