plan 9 kernel history: overview | file list | diff list

1998/0603/port/devaudio.c (diff list | history)

1998/0512/sys/src/9/port/devaudio.c:879,8841998/0603/sys/src/9/port/devaudio.c:879,896 (short | long | prev | next)
Bug fix: flush final partial buffer on close of write fd.
rsc Fri Mar 4 12:44:25 2005
1995/0119    
	case Qaudio: 
		if(c->flag & COPEN) { 
1995/0214    
			qlock(&audio); 
1998/0603    
			if (audio.amode == Awrite) { 
				/* flush out last partial buffer */ 
				Buf *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) 
					pokeaudio(); 
			} 
1995/0214    
			audio.amode = Aclosed; 
			if(waserror()){ 
				qunlock(&audio); 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)