4
* Copyright (C) 1998 Rasca, Berlin
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 2 of the License, or
10
* (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24
#include <linux/soundcard.h>
26
#include <sys/soundcard.h>
37
#define SNDBUFFER 4096
39
int snd_init (char *sound_device);
40
int snd_open_play (void);
41
int snd_close_play (void);
42
int snd_open_rec (void);
43
int snd_close_rec (void);
44
int snd_play_data(unsigned char *buf, int size, int offset);
45
int snd_rec_data(unsigned char *buf, int max_size);
46
int snd_set_samplesize (int samplesize);
47
int snd_set_speed (int speed);
48
int snd_set_stereo (int boolval);
49
int snd_set_channels (int);
50
int snd_get_blksize (void);
51
int snd_get_fmts (void);
52
int snd_set_fmt (int);
53
int snd_set_trigger_out (void);
57
int snd_wave_length (unsigned char *header);
58
int snd_wave_info (unsigned char *header, int *mode);
59
int snd_wave_prepare (int *speed, int *mode);
60
int snd_wave_prepare_header (int speed, int mode, char **dst);
61
int snd_get_interval (int blksize, int speed, int mode);
62
unsigned int snd_get_caps (void);
63
int snd_has_feature(unsigned int feature);
64
#define snd_has_duplex() snd_has_feature(DSP_CAP_DUPLEX)
65
#define snd_has_realtime() snd_has_feature(DSP_CAP_REALTIME)
66
#define snd_has_batch() snd_has_feature(DSP_CAP_BATCH)
67
#define snd_has_trigger() snd_has_feature(DSP_CAP_TRIGGER)
68
#define snd_has_mmap() snd_has_feature(DSP_CAP_MMAP)