version 1.55, 2011/04/16 10:52:22 |
version 1.56, 2011/04/16 11:24:18 |
|
|
f->rstate = SOCK_RRET; |
f->rstate = SOCK_RRET; |
f->rtodo = sizeof(struct amsg); |
f->rtodo = sizeof(struct amsg); |
break; |
break; |
case AMSG_GETCAP: |
|
#ifdef DEBUG |
|
if (debug_level >= 3) { |
|
sock_dbg(f); |
|
dbg_puts(": GETCAP message\n"); |
|
} |
|
#endif |
|
if (f->pstate != SOCK_INIT) { |
|
#ifdef DEBUG |
|
if (debug_level >= 1) { |
|
sock_dbg(f); |
|
dbg_puts(": GETCAP, bad state\n"); |
|
} |
|
#endif |
|
aproc_del(f->pipe.file.rproc); |
|
return 0; |
|
} |
|
AMSG_INIT(m); |
|
m->cmd = AMSG_GETCAP; |
|
m->u.cap.rate = f->dev->rate; |
|
m->u.cap.pchan = (f->opt->mode & MODE_PLAY) ? |
|
(f->opt->rpar.cmax - f->opt->rpar.cmin + 1) : 0; |
|
m->u.cap.rchan = (f->opt->mode & (MODE_PLAY | MODE_REC)) ? |
|
(f->opt->wpar.cmax - f->opt->wpar.cmin + 1) : 0; |
|
m->u.cap.bits = ADATA_BITS; |
|
m->u.cap.bps = sizeof(adata_t); |
|
f->rstate = SOCK_RRET; |
|
f->rtodo = sizeof(struct amsg); |
|
break; |
|
case AMSG_SETVOL: |
case AMSG_SETVOL: |
#ifdef DEBUG |
#ifdef DEBUG |
if (debug_level >= 3) { |
if (debug_level >= 3) { |