1 |
/* |
/* |
2 |
rdesktop: A Remote Desktop Protocol client. |
rdesktop: A Remote Desktop Protocol client. |
3 |
Sound Channel Process Functions - Open Sound System |
Sound Channel Process Functions - Open Sound System |
4 |
Copyright (C) Matthew Chapman 2003 |
Copyright (C) Matthew Chapman 2003 |
138 |
{ |
{ |
139 |
audio_buf_info info; |
audio_buf_info info; |
140 |
|
|
141 |
|
memset(&info,0,sizeof(info)); |
142 |
if (ioctl(g_dsp_fd, SNDCTL_DSP_GETOSPACE, &info) == -1) |
if (ioctl(g_dsp_fd, SNDCTL_DSP_GETOSPACE, &info) == -1) |
143 |
{ |
{ |
144 |
perror("SNDCTL_DSP_GETOSPACE"); |
perror("SNDCTL_DSP_GETOSPACE"); |
213 |
packet->s.p += 4; |
packet->s.p += 4; |
214 |
|
|
215 |
/* we steal the data buffer from s, give it a new one */ |
/* we steal the data buffer from s, give it a new one */ |
216 |
s->data = malloc(s->size); |
s->data = (uint8 *) malloc(s->size); |
217 |
|
|
218 |
if (!g_dsp_busy) |
if (!g_dsp_busy) |
219 |
wave_out_play(); |
wave_out_play(); |
254 |
|
|
255 |
if (!g_driver_broken) |
if (!g_driver_broken) |
256 |
{ |
{ |
257 |
|
memset(&info,0,sizeof(info)); |
258 |
if (ioctl(g_dsp_fd, SNDCTL_DSP_GETOSPACE, &info) == -1) |
if (ioctl(g_dsp_fd, SNDCTL_DSP_GETOSPACE, &info) == -1) |
259 |
{ |
{ |
260 |
perror("SNDCTL_DSP_GETOSPACE"); |
perror("SNDCTL_DSP_GETOSPACE"); |