version 1.36, 2021/01/29 11:36:44 |
version 1.37, 2021/01/29 11:38:23 |
|
|
struct slot { |
struct slot { |
struct slotops *ops; /* client callbacks */ |
struct slotops *ops; /* client callbacks */ |
struct slot *next; /* next on the play list */ |
struct slot *next; /* next on the play list */ |
struct dev *dev; /* device this belongs to */ |
|
struct opt *opt; /* config used */ |
struct opt *opt; /* config used */ |
void *arg; /* user data for callbacks */ |
void *arg; /* user data for callbacks */ |
struct aparams par; /* socket side params */ |
struct aparams par; /* socket side params */ |
|
|
int xrun; /* underrun policy */ |
int xrun; /* underrun policy */ |
int skip; /* cycles to skip (for xrun) */ |
int skip; /* cycles to skip (for xrun) */ |
#define SLOT_BUFSZ(s) \ |
#define SLOT_BUFSZ(s) \ |
((s)->appbufsz + (s)->dev->bufsz / (s)->dev->round * (s)->round) |
((s)->appbufsz + (s)->opt->dev->bufsz / (s)->opt->dev->round * (s)->round) |
int appbufsz; /* slot-side buffer size */ |
int appbufsz; /* slot-side buffer size */ |
int round; /* slot-side block size */ |
int round; /* slot-side block size */ |
int rate; /* slot-side sample rate */ |
int rate; /* slot-side sample rate */ |
|
|
* sio_open(3) like interface for clients |
* sio_open(3) like interface for clients |
*/ |
*/ |
void slot_log(struct slot *); |
void slot_log(struct slot *); |
struct slot *slot_new(struct dev *, struct opt *, unsigned int, char *, |
struct slot *slot_new(struct opt *, unsigned int, char *, |
struct slotops *, void *, int); |
struct slotops *, void *, int); |
void slot_del(struct slot *); |
void slot_del(struct slot *); |
void slot_setvol(struct slot *, unsigned int); |
void slot_setvol(struct slot *, unsigned int); |