version 1.13, 2011/04/28 07:20:03 |
version 1.14, 2012/04/11 06:05:43 |
|
|
* by the machine. |
* by the machine. |
*/ |
*/ |
void |
void |
aparams_init(struct aparams *par, unsigned cmin, unsigned cmax, unsigned rate) |
aparams_init(struct aparams *par, unsigned int cmin, unsigned int cmax, |
|
unsigned int rate) |
{ |
{ |
par->bps = sizeof(adata_t); |
par->bps = sizeof(adata_t); |
par->bits = ADATA_BITS; |
par->bits = ADATA_BITS; |
|
|
/* |
/* |
* Return the number of bytes per frame with the given parameters. |
* Return the number of bytes per frame with the given parameters. |
*/ |
*/ |
unsigned |
unsigned int |
aparams_bpf(struct aparams *par) |
aparams_bpf(struct aparams *par) |
{ |
{ |
return (par->cmax - par->cmin + 1) * par->bps; |
return (par->cmax - par->cmin + 1) * par->bps; |