1 /* audio.h -- audio headers */
12 #include <sys/types.h>
14 #include <sys/ioctl.h>
15 #include <sys/soundcard.h>
18 #define MAX_CHAR_DEVICE 32
19 #define SOUND_DEVICE "/dev/dsp"
25 #define BIT_16 AFMT_S16_LE
29 /* audio specific variables */
30 typedef struct s_audio {
33 char dsp_dev[MAX_CHAR_DEVICE];
34 char mixer_dev[MAX_CHAR_DEVICE];
42 unsigned char *play_data;
43 unsigned char *rec_data;
46 /* function prototypes */
47 int audio_init(t_audio *audio);
48 int audio_setup(t_audio *audio);
49 int audio_shutdown(t_audio *audio);
50 int audio_play(t_audio *audio,int len);
51 int audio_record(t_audio *audio,int len);