@@ 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;