version 1.8, 2008/08/14 15:25:16 |
version 1.9, 2008/10/26 08:49:43 |
|
|
unsigned xrun; /* common to mix and sub */ |
unsigned xrun; /* common to mix and sub */ |
LIST_ENTRY(abuf) ient; /* for mix inputs list */ |
LIST_ENTRY(abuf) ient; /* for mix inputs list */ |
LIST_ENTRY(abuf) oent; /* for sub outputs list */ |
LIST_ENTRY(abuf) oent; /* for sub outputs list */ |
|
|
/* |
/* |
* fifo parameters |
* fifo parameters |
*/ |
*/ |
|
|
unsigned drop; /* bytes to drop on next read */ |
unsigned drop; /* bytes to drop on next read */ |
struct aproc *rproc; /* reader */ |
struct aproc *rproc; /* reader */ |
struct aproc *wproc; /* writer */ |
struct aproc *wproc; /* writer */ |
|
struct abuf *duplex; /* link to buffer of the other direction */ |
|
unsigned inuse; /* in abuf_{flush,fill,run}() */ |
unsigned char *data; /* actual data (immediately following) */ |
unsigned char *data; /* actual data (immediately following) */ |
}; |
}; |
|
|
|
|
#define ABUF_EOF(b) (!ABUF_ROK(b) && (b)->wproc == NULL) |
#define ABUF_EOF(b) (!ABUF_ROK(b) && (b)->wproc == NULL) |
|
|
/* |
/* |
|
* the buffer is empty and has no more writer |
|
*/ |
|
#define ABUF_HUP(b) (!ABUF_WOK(b) && (b)->rproc == NULL) |
|
|
|
/* |
* similar to !ABUF_WOK, but is used for file i/o, where |
* similar to !ABUF_WOK, but is used for file i/o, where |
* operation may not involve an integer number of frames |
* operation may not involve an integer number of frames |
*/ |
*/ |
|
|
unsigned char *abuf_wgetblk(struct abuf *, unsigned *, unsigned); |
unsigned char *abuf_wgetblk(struct abuf *, unsigned *, unsigned); |
void abuf_rdiscard(struct abuf *, unsigned); |
void abuf_rdiscard(struct abuf *, unsigned); |
void abuf_wcommit(struct abuf *, unsigned); |
void abuf_wcommit(struct abuf *, unsigned); |
void abuf_fill(struct abuf *); |
int abuf_fill(struct abuf *); |
void abuf_flush(struct abuf *); |
int abuf_flush(struct abuf *); |
void abuf_eof(struct abuf *); |
void abuf_eof(struct abuf *); |
void abuf_hup(struct abuf *); |
void abuf_hup(struct abuf *); |
void abuf_run(struct abuf *); |
void abuf_run(struct abuf *); |
|
void abuf_ipos(struct abuf *, int); |
|
void abuf_opos(struct abuf *, int); |
|
|
#endif /* !defined(ABUF_H) */ |
#endif /* !defined(ABUF_H) */ |