--- sourceforge.net/trunk/rdesktop/rdpsnd_sgi.c 2006/12/24 15:24:17 1355 +++ sourceforge.net/trunk/rdesktop/rdpsnd_sgi.c 2008/07/11 03:51:23 1475 @@ -1,7 +1,7 @@ /* -*- c-basic-offset: 8 -*- rdesktop: A Remote Desktop Protocol client. Sound Channel Process Functions - SGI/IRIX - Copyright (C) Matthew Chapman 2003 + Copyright (C) Matthew Chapman 2003-2008 Copyright (C) GuoJunBo guojunbo@ict.ac.cn 2003 Copyright (C) Jeremy Meng void.foo@gmail.com 2004, 2005 @@ -45,7 +45,8 @@ sgi_add_fds(int *n, fd_set * rfds, fd_set * wfds, struct timeval *tv) { /* We need to be called rather often... */ - FD_SET(0, wfds); + if (output_port != (ALport) 0 && !rdpsnd_queue_empty()) + FD_SET(0, wfds); } void @@ -58,7 +59,7 @@ sgi_play(); } -BOOL +RD_BOOL sgi_open(void) { ALparamInfo pinfo; @@ -127,8 +128,8 @@ #endif } -BOOL -sgi_format_supported(WAVEFORMATEX * pwfx) +RD_BOOL +sgi_format_supported(RD_WAVEFORMATEX * pwfx) { if (pwfx->wFormatTag != WAVE_FORMAT_PCM) return False; @@ -140,8 +141,8 @@ return True; } -BOOL -sgi_set_format(WAVEFORMATEX * pwfx) +RD_BOOL +sgi_set_format(RD_WAVEFORMATEX * pwfx) { int channels; int frameSize, channelCount; @@ -294,8 +295,10 @@ { static struct audio_driver sgi_driver; - sgi_driver.name = xstrdup("sgi"); - sgi_driver.description = xstrdup("SGI output driver"); + memset(&sgi_driver, 0, sizeof(sgi_driver)); + + sgi_driver.name = "sgi"; + sgi_driver.description = "SGI output driver"; sgi_driver.add_fds = sgi_add_fds; sgi_driver.check_fds = sgi_check_fds;