35 |
#define DEFAULTDEVICE "/dev/audio" |
#define DEFAULTDEVICE "/dev/audio" |
36 |
|
|
37 |
static int dsp_fd = -1; |
static int dsp_fd = -1; |
38 |
static BOOL dsp_busy; |
static RD_BOOL dsp_busy; |
39 |
|
|
40 |
static BOOL g_reopened; |
static RD_BOOL g_reopened; |
41 |
static short g_samplewidth; |
static short g_samplewidth; |
42 |
static char *dsp_dev; |
static char *dsp_dev; |
43 |
|
|
64 |
sun_play(); |
sun_play(); |
65 |
} |
} |
66 |
|
|
67 |
BOOL |
RD_BOOL |
68 |
sun_open(void) |
sun_open(void) |
69 |
{ |
{ |
70 |
if ((dsp_fd = open(dsp_dev, O_WRONLY | O_NONBLOCK)) == -1) |
if ((dsp_fd = open(dsp_dev, O_WRONLY | O_NONBLOCK)) == -1) |
99 |
dsp_fd = -1; |
dsp_fd = -1; |
100 |
} |
} |
101 |
|
|
102 |
BOOL |
RD_BOOL |
103 |
sun_format_supported(RD_WAVEFORMATEX * pwfx) |
sun_format_supported(RD_WAVEFORMATEX * pwfx) |
104 |
{ |
{ |
105 |
if (pwfx->wFormatTag != WAVE_FORMAT_PCM) |
if (pwfx->wFormatTag != WAVE_FORMAT_PCM) |
112 |
return True; |
return True; |
113 |
} |
} |
114 |
|
|
115 |
BOOL |
RD_BOOL |
116 |
sun_set_format(RD_WAVEFORMATEX * pwfx) |
sun_set_format(RD_WAVEFORMATEX * pwfx) |
117 |
{ |
{ |
118 |
audio_info_t info; |
audio_info_t info; |
199 |
ssize_t len; |
ssize_t len; |
200 |
unsigned int i; |
unsigned int i; |
201 |
STREAM out; |
STREAM out; |
202 |
static BOOL sentcompletion = True; |
static RD_BOOL sentcompletion = True; |
203 |
static uint32 samplecnt = 0; |
static uint32 samplecnt = 0; |
204 |
static uint32 numsamples; |
static uint32 numsamples; |
205 |
|
|