mailmap: add mail alias
[transsip.git] / src / alsa.h
blobf2a1a792b75b8b2d5905e9ba1e6906b038898494
1 /*
2 * transsip - the telephony toolkit
3 * By Daniel Borkmann <daniel@transsip.org>
4 * Copyright 2011, 2012 Daniel Borkmann <dborkma@tik.ee.ethz.ch>
5 * Subject to the GPL, version 2.
6 */
8 #ifndef ALSA_H
9 #define ALSA_H
11 #include <sys/poll.h>
13 struct alsa_dev;
15 extern struct alsa_dev *alsa_open(char *devname, unsigned int rate,
16 int channels, int period);
17 extern void alsa_close(struct alsa_dev *dev);
18 extern ssize_t alsa_read(struct alsa_dev *dev, short *pcm, size_t len);
19 extern ssize_t alsa_write(struct alsa_dev *dev, const short *pcm, size_t len);
20 extern int alsa_cap_ready(struct alsa_dev *dev, struct pollfd *pfds,
21 unsigned int nfds);
22 extern int alsa_play_ready(struct alsa_dev *dev, struct pollfd *pfds,
23 unsigned int nfds);
24 extern void alsa_start(struct alsa_dev *dev);
25 extern void alsa_stop(struct alsa_dev *dev);
26 extern unsigned int alsa_nfds(struct alsa_dev *dev);
27 extern void alsa_getfds(struct alsa_dev *dev, struct pollfd *pfds,
28 unsigned int nfds);
30 #endif /* ALSA_H */