diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2008-10-26 08:49:45 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2008-10-26 08:49:45 +0000 |
commit | 13e276c156d9b9f3a5064700b447d8e90d89bebf (patch) | |
tree | 7c47aad8fcd6da2de5156ec12853b26ee468547e /usr.bin/aucat/dev.h | |
parent | c1f6af90f771854093903e82e7de930b96a15d25 (diff) |
add minimal server capability to aucat(1). When started in server
mode, it listens on an unix socket and mixes/demultiplexes any number
of full-duplex streams, doing necessary format conversions and
resampling on the fly.
programs can use the new libsa(3) library to play and record audio.
The library provides a very simple API to connect to the audio server;
if aucat(1) isn't running, it uses the audio(4) driver transparently
instead.
Diffstat (limited to 'usr.bin/aucat/dev.h')
-rw-r--r-- | usr.bin/aucat/dev.h | 29 |
1 files changed, 7 insertions, 22 deletions
diff --git a/usr.bin/aucat/dev.h b/usr.bin/aucat/dev.h index e5b50af53a3..b23fd9e1561 100644 --- a/usr.bin/aucat/dev.h +++ b/usr.bin/aucat/dev.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dev.h,v 1.2 2008/08/14 09:58:55 ratchov Exp $ */ +/* $OpenBSD: dev.h,v 1.3 2008/10/26 08:49:43 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -22,37 +22,22 @@ struct aparams; struct file; struct abuf; -extern unsigned dev_infr, dev_onfr; +extern unsigned dev_bufsz, dev_round, dev_rate; +extern unsigned dev_rate_div, dev_round_div; extern struct aparams dev_ipar, dev_opar; extern struct aproc *dev_mix, *dev_sub, *dev_rec, *dev_play; -extern struct file *dev_file; -void dev_fill(void); -void dev_flush(void); -void dev_init(char *, struct aparams *, struct aparams *); +void dev_roundrate(unsigned *, unsigned *); +void dev_init(char *, struct aparams *, struct aparams *, unsigned); void dev_start(void); void dev_stop(void); void dev_run(int); void dev_done(void); +void dev_sync(struct abuf *, struct abuf *); void dev_attach(char *, struct abuf *, struct aparams *, unsigned, struct abuf *, struct aparams *, unsigned); -struct devops { - int (*open)(char *, struct aparams *, struct aparams *, - unsigned *, unsigned *); - void (*close)(int); - void (*start)(int); - void (*stop)(int); -}; - -extern struct devops *devops, devops_sun; - -/* - * Sun API specific functions - */ -struct audio_prinfo; -int sun_infotopar(struct audio_prinfo *, struct aparams *); -void sun_partoinfo(struct audio_prinfo *, struct aparams *); +extern struct devops *devops, devops_sun, devops_aucat; #endif /* !define(DEV_H) */ |