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

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

1998/0603/sys/src/9/port/devaudio.c:866,8711998/0624/sys/src/9/port/devaudio.c:866,872 (short | long | prev | next)
Formatting edit.
rsc Fri Mar 4 12:44:25 2005
1997/0327    
static void 
1995/0119    
audioclose(Chan *c) 
{ 
1998/0624    
	Buf *b; 
1995/0119    
 
	switch(c->qid.path & ~CHDIR) { 
	default: 
1998/0603/sys/src/9/port/devaudio.c:879,8941998/0624/sys/src/9/port/devaudio.c:880,895
1995/0119    
	case Qaudio: 
		if(c->flag & COPEN) { 
1995/0214    
			qlock(&audio); 
1998/0603    
			if (audio.amode == Awrite) { 
1998/0624    
			if(audio.amode == Awrite) { 
1998/0603    
				/* flush out last partial buffer */ 
				Buf *b = audio.filling; 
				if (b) { 
1998/0624    
				b = audio.filling; 
				if(b) { 
1998/0603    
					audio.filling = 0; 
					memset(b->virt, 0, Bufsize-audio.curcount); 
					swab(b->virt); 
					putbuf(&audio.full, b); 
				} 
				if (!audio.active && audio.full.first) 
1998/0624    
				if(!audio.active && audio.full.first) 
1998/0603    
					pokeaudio(); 
			} 
1995/0214    
			audio.amode = Aclosed; 


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