5
#define AUDIO_OUT_HEADPHONES 0x01
6
#define AUDIO_OUT_INTERNAL_SPEAKER 0x02
7
#define AUDIO_OUT_LINE_OUT 0x04
9
enum { DECODE_TEST, DECODE_AUDIO, DECODE_FILE, DECODE_BUFFER, DECODE_WAV,
10
DECODE_AU,DECODE_CDR,DECODE_AUDIOFILE };
12
#define AUDIO_FORMAT_MASK 0x100
13
#define AUDIO_FORMAT_16 0x100
14
#define AUDIO_FORMAT_8 0x000
16
#define AUDIO_FORMAT_SIGNED_16 0x110
17
#define AUDIO_FORMAT_UNSIGNED_16 0x120
18
#define AUDIO_FORMAT_UNSIGNED_8 0x1
19
#define AUDIO_FORMAT_SIGNED_8 0x2
20
#define AUDIO_FORMAT_ULAW_8 0x4
21
#define AUDIO_FORMAT_ALAW_8 0x8
23
/* 3% rate tolerance */
24
#define AUDIO_RATE_TOLERANCE 3
27
#if defined(HPUX) || defined(SUNOS) || defined(SOLARIS) || defined(OSS) || defined(__NetBSD__) || defined(SPARCLINUX) || defined(__FreeBSD__)
35
#include <UMSAudioDevice.h>
39
/* #include <audio.h> */
40
#include <dmedia/audio.h>
45
#include <sys/asoundlib.h>
48
struct audio_info_struct
51
int fn; /* filenumber */
62
snd_pcm_format_t alsa_format;
66
UMSAudioDeviceMClass class;
68
UMSAudioDeviceMClass_ErrorCode err;
87
extern void audio_capabilities(struct audio_info_struct *);
88
extern void audio_fit_capabilities(struct audio_info_struct *ai,int c,int r);
90
extern char *audio_encoding_name(int format);
92
extern int audio_play_samples(struct audio_info_struct *,unsigned char *,int);
93
extern int audio_open(struct audio_info_struct *);
94
extern int audio_reset_parameters(struct audio_info_struct *);
95
extern int audio_rate_best_match(struct audio_info_struct *ai);
96
extern int audio_set_rate(struct audio_info_struct *);
97
extern int audio_set_format(struct audio_info_struct *);
98
extern int audio_get_formats(struct audio_info_struct *);
99
extern int audio_set_channels(struct audio_info_struct *);
100
extern int audio_write_sample(struct audio_info_struct *,short *,int);
101
extern int audio_close(struct audio_info_struct *);
102
extern void audio_info_struct_init(struct audio_info_struct *);
103
extern void audio_queueflush(struct audio_info_struct *ai);