blob: 964e526fb476780f6e1889793c0bfccc117f040b [file] [log] [blame]
Dave Chapmanef5f97b2002-05-12 12:30:14 +00001/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 *
9 * Copyright (C) 2002 Dave Chapman
10 *
Dave Chapmanf07bfd02002-05-12 14:58:41 +000011 * sound.h - common sound driver file.
Dave Chapmanef5f97b2002-05-12 12:30:14 +000012 *
13 * All files in this archive are subject to the GNU General Public License.
14 * See the file COPYING in the source tree root for full license agreement.
15 *
16 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
17 * KIND, either express or implied.
18 *
19 ****************************************************************************/
20
Dave Chapmanf07bfd02002-05-12 14:58:41 +000021#ifndef _SOUND_H
22#define _SOUND_H
23
Björn Stenbergf6ed9702003-07-04 08:30:01 +000024#ifdef HAVE_OSS
Dave Chapmanef5f97b2002-05-12 12:30:14 +000025
Dave Chapman553c2562002-05-15 07:27:48 +000026/* The "sound device type" */
27
28typedef struct {
29 int fd;
30 int freq;
31 int channels;
32} sound_t;
Dave Chapmanef5f97b2002-05-12 12:30:14 +000033
Dave Chapmanf07bfd02002-05-12 14:58:41 +000034#else
35 #ifdef WIN32
36 #warning "No sound yet in win32"
37 #else
38 #warning "No sound in this environment"
39 #endif
40#endif
41
Dave Chapmanef5f97b2002-05-12 12:30:14 +000042int init_sound(sound_t* sound);
43int config_sound(sound_t* sound, int sound_freq, int channels);
44void close_sound(sound_t* sound);
45int output_sound(sound_t* sound,const void* buf, int count);
Dave Chapmanf07bfd02002-05-12 14:58:41 +000046
47#endif