~kris/9p

9hist

77fd24e93a2a291af7af8f4627b6024da2ac16ee — David du Colombier 28 years ago 5591e90
Plan 9 from Bell Labs 1998-06-24
1 files changed, 5 insertions(+), 4 deletions(-)

M port/devaudio.c
M port/devaudio.c => port/devaudio.c +5 -4
@@ 866,6 866,7 @@ audioopen(Chan *c, int omode)
static void
audioclose(Chan *c)
{
	Buf *b;

	switch(c->qid.path & ~CHDIR) {
	default:


@@ 879,16 880,16 @@ audioclose(Chan *c)
	case Qaudio:
		if(c->flag & COPEN) {
			qlock(&audio);
			if (audio.amode == Awrite) {
			if(audio.amode == Awrite) {
				/* flush out last partial buffer */
				Buf *b = audio.filling;
				if (b) {
				b = audio.filling;
				if(b) {
					audio.filling = 0;
					memset(b->virt, 0, Bufsize-audio.curcount);
					swab(b->virt);
					putbuf(&audio.full, b);
				}
				if (!audio.active && audio.full.first)
				if(!audio.active && audio.full.first)
					pokeaudio();
			}
			audio.amode = Aclosed;