48 |
static int dsp_mode; |
static int dsp_mode; |
49 |
static int dsp_refs; |
static int dsp_refs; |
50 |
|
|
51 |
static BOOL dsp_configured; |
static RD_BOOL dsp_configured; |
52 |
|
|
53 |
static BOOL dsp_out; |
static RD_BOOL dsp_out; |
54 |
static BOOL dsp_in; |
static RD_BOOL dsp_in; |
55 |
|
|
56 |
static int stereo; |
static int stereo; |
57 |
static int format; |
static int format; |
58 |
static int snd_rate; |
static int snd_rate; |
59 |
static short samplewidth; |
static short samplewidth; |
60 |
static char *dsp_dev; |
static char *dsp_dev; |
61 |
static BOOL in_esddsp; |
static RD_BOOL in_esddsp; |
62 |
|
|
63 |
/* This is a just a forward declaration */ |
/* This is a just a forward declaration */ |
64 |
static struct audio_driver oss_driver; |
static struct audio_driver oss_driver; |
89 |
oss_record(); |
oss_record(); |
90 |
} |
} |
91 |
|
|
92 |
static BOOL |
static RD_BOOL |
93 |
detect_esddsp(void) |
detect_esddsp(void) |
94 |
{ |
{ |
95 |
struct stat s; |
struct stat s; |
111 |
return True; |
return True; |
112 |
} |
} |
113 |
|
|
114 |
BOOL |
RD_BOOL |
115 |
oss_open(int fallback) |
oss_open(int fallback) |
116 |
{ |
{ |
117 |
int caps; |
int caps; |
176 |
dsp_fd = -1; |
dsp_fd = -1; |
177 |
} |
} |
178 |
|
|
179 |
BOOL |
RD_BOOL |
180 |
oss_open_out(void) |
oss_open_out(void) |
181 |
{ |
{ |
182 |
if (!oss_open(O_WRONLY)) |
if (!oss_open(O_WRONLY)) |
199 |
dsp_out = False; |
dsp_out = False; |
200 |
} |
} |
201 |
|
|
202 |
BOOL |
RD_BOOL |
203 |
oss_open_in(void) |
oss_open_in(void) |
204 |
{ |
{ |
205 |
if (!oss_open(O_RDONLY)) |
if (!oss_open(O_RDONLY)) |
218 |
dsp_in = False; |
dsp_in = False; |
219 |
} |
} |
220 |
|
|
221 |
BOOL |
RD_BOOL |
222 |
oss_format_supported(RD_WAVEFORMATEX * pwfx) |
oss_format_supported(RD_WAVEFORMATEX * pwfx) |
223 |
{ |
{ |
224 |
if (pwfx->wFormatTag != WAVE_FORMAT_PCM) |
if (pwfx->wFormatTag != WAVE_FORMAT_PCM) |
231 |
return True; |
return True; |
232 |
} |
} |
233 |
|
|
234 |
BOOL |
RD_BOOL |
235 |
oss_set_format(RD_WAVEFORMATEX * pwfx) |
oss_set_format(RD_WAVEFORMATEX * pwfx) |
236 |
{ |
{ |
237 |
int fragments; |
int fragments; |
238 |
static BOOL driver_broken = False; |
static RD_BOOL driver_broken = False; |
239 |
|
|
240 |
if (dsp_configured) |
if (dsp_configured) |
241 |
{ |
{ |