root/rat/trunk/auddev_oss.h @ 2107

Revision 2107, 3.5 KB (checked in by ucacoxh, 15 years ago)

- First stab at oss audio interface update. No Linux machine to test
it on for the moment :-(

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1/*
2 * FILE:     auddev_oss.h
3 * PROGRAM:  RAT
4 * AUTHOR:   Orion Hodson
5 *
6 * $Revision$
7 * $Date$
8 *
9 * Copyright (c) 1998 University College London
10 * All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, is permitted, for non-commercial use only, provided
14 * that the following conditions are met:
15 * 1. Redistributions of source code must retain the above copyright
16 *    notice, this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above copyright
18 *    notice, this list of conditions and the following disclaimer in the
19 *    documentation and/or other materials provided with the distribution.
20 * 3. All advertising materials mentioning features or use of this software
21 *    must display the following acknowledgement:
22 *      This product includes software developed by the Computer Science
23 *      Department at University College London
24 * 4. Neither the name of the University nor of the Department may be used
25 *    to endorse or promote products derived from this software without
26 *    specific prior written permission.
27 * Use of this software for commercial purposes is explicitly forbidden
28 * unless prior written permission is obtained from the authors.
29 *
30 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
31 * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
33 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
34 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
35 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
36 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
37 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
38 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
39 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
40 * SUCH DAMAGE.
41 */
42
43#ifndef _AUDDEV_OSS_H_
44#define _AUDDEV_OSS_H_
45
46int  oss_audio_open       (audio_desc_t ad, audio_format* ifmt, audio_format *ofmt);
47void oss_audio_close      (audio_desc_t ad);
48void oss_audio_drain      (audio_desc_t ad);
49int  oss_audio_duplex     (audio_desc_t ad);
50void oss_audio_set_gain   (audio_desc_t ad, int gain);
51int  oss_audio_get_gain   (audio_desc_t ad);
52void oss_audio_set_volume (audio_desc_t ad, int vol);
53int  oss_audio_get_volume (audio_desc_t ad);
54void oss_audio_loopback   (audio_desc_t ad, int gain);
55int  oss_audio_read       (audio_desc_t ad, u_char *buf, int buf_bytes);
56int  oss_audio_write      (audio_desc_t ad, u_char *buf, int buf_bytes);
57void oss_audio_non_block  (audio_desc_t ad);
58void oss_audio_block      (audio_desc_t ad);
59void oss_audio_set_oport  (audio_desc_t ad, int port);
60int  oss_audio_get_oport  (audio_desc_t ad);
61int  oss_audio_next_oport (audio_desc_t ad);
62void oss_audio_set_iport  (audio_desc_t ad, int port);
63int  oss_audio_get_iport  (audio_desc_t ad);
64int  oss_audio_next_iport (audio_desc_t ad);
65int  oss_audio_is_ready  (audio_desc_t ad);
66void oss_audio_wait_for  (audio_desc_t ad, int delay_ms);
67
68/* Functions to get names of oss devices */
69void oss_audio_query_devices (void);       /* This fn works out what we have           */
70int oss_get_device_count     (void);       /* Then this one tells us the number of 'em */
71char *oss_get_device_name    (int idx);    /* Then this one tells us the name          */
72
73#endif /* _AUDDEV_OSS_H_ */
Note: See TracBrowser for help on using the browser.