1 |
/* -*- c-basic-offset: 8 -*- |
/* -*- c-basic-offset: 8 -*- |
2 |
rdesktop: A Remote Desktop Protocol client. |
rdesktop: A Remote Desktop Protocol client. |
3 |
Sound Channel Process Functions - SGI/IRIX |
Sound Channel Process Functions - SGI/IRIX |
4 |
Copyright (C) Matthew Chapman 2003 |
Copyright (C) Matthew Chapman 2003-2008 |
5 |
Copyright (C) GuoJunBo guojunbo@ict.ac.cn 2003 |
Copyright (C) GuoJunBo guojunbo@ict.ac.cn 2003 |
6 |
Copyright (C) Jeremy Meng void.foo@gmail.com 2004, 2005 |
Copyright (C) Jeremy Meng void.foo@gmail.com 2004, 2005 |
7 |
|
|
45 |
sgi_add_fds(int *n, fd_set * rfds, fd_set * wfds, struct timeval *tv) |
sgi_add_fds(int *n, fd_set * rfds, fd_set * wfds, struct timeval *tv) |
46 |
{ |
{ |
47 |
/* We need to be called rather often... */ |
/* We need to be called rather often... */ |
48 |
FD_SET(0, wfds); |
if (output_port != (ALport) 0 && !rdpsnd_queue_empty()) |
49 |
|
FD_SET(0, wfds); |
50 |
} |
} |
51 |
|
|
52 |
void |
void |
59 |
sgi_play(); |
sgi_play(); |
60 |
} |
} |
61 |
|
|
62 |
BOOL |
RD_BOOL |
63 |
sgi_open(void) |
sgi_open(void) |
64 |
{ |
{ |
65 |
ALparamInfo pinfo; |
ALparamInfo pinfo; |
128 |
#endif |
#endif |
129 |
} |
} |
130 |
|
|
131 |
BOOL |
RD_BOOL |
132 |
sgi_format_supported(WAVEFORMATEX * pwfx) |
sgi_format_supported(RD_WAVEFORMATEX * pwfx) |
133 |
{ |
{ |
134 |
if (pwfx->wFormatTag != WAVE_FORMAT_PCM) |
if (pwfx->wFormatTag != WAVE_FORMAT_PCM) |
135 |
return False; |
return False; |
141 |
return True; |
return True; |
142 |
} |
} |
143 |
|
|
144 |
BOOL |
RD_BOOL |
145 |
sgi_set_format(WAVEFORMATEX * pwfx) |
sgi_set_format(RD_WAVEFORMATEX * pwfx) |
146 |
{ |
{ |
147 |
int channels; |
int channels; |
148 |
int frameSize, channelCount; |
int frameSize, channelCount; |
295 |
{ |
{ |
296 |
static struct audio_driver sgi_driver; |
static struct audio_driver sgi_driver; |
297 |
|
|
298 |
sgi_driver.name = xstrdup("sgi"); |
memset(&sgi_driver, 0, sizeof(sgi_driver)); |
299 |
sgi_driver.description = xstrdup("SGI output driver"); |
|
300 |
|
sgi_driver.name = "sgi"; |
301 |
|
sgi_driver.description = "SGI output driver"; |
302 |
|
|
303 |
sgi_driver.add_fds = sgi_add_fds; |
sgi_driver.add_fds = sgi_add_fds; |
304 |
sgi_driver.check_fds = sgi_check_fds; |
sgi_driver.check_fds = sgi_check_fds; |