added switch (-A) to disable rdpsnd

git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@500 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Michael Gernoth 2003-10-17 08:23:47 +00:00
parent c60d7c4f3f
commit 18e4c6017b
2 changed files with 20 additions and 4 deletions

View File

@ -68,6 +68,10 @@ BOOL g_use_rdp5 = True;
BOOL g_console_session = False;
extern BOOL g_owncolmap;
#ifdef WITH_RDPSND
BOOL g_rdpsnd = True;
#endif
#ifdef RDP2VNC
extern int rfb_port;
extern int defer_time;
@ -106,6 +110,9 @@ usage(char *program)
fprintf(stderr, " -K: keep window manager key bindings\n");
fprintf(stderr, " -T: window title\n");
fprintf(stderr, " -D: hide window manager decorations\n");
#ifdef WITH_RDPSND
fprintf(stderr, " -A: disable audio-redirection\n");
#endif
fprintf(stderr, " -a: server bpp\n");
fprintf(stderr, " -0: attach to console\n");
fprintf(stderr, " -4: use RDP version 4\n");
@ -224,7 +231,7 @@ main(int argc, char *argv[])
#define VNCOPT
#endif
while ((c = getopt(argc, argv, VNCOPT "u:d:s:S:c:p:n:k:g:a:fbeEmCKT:D045h?")) != -1)
while ((c = getopt(argc, argv, VNCOPT "u:d:s:S:c:p:n:k:g:a:fbeEmCKT:AD045h?")) != -1)
{
switch (c)
{
@ -372,6 +379,11 @@ main(int argc, char *argv[])
}
break;
#ifdef WITH_RDPSND
case 'A':
g_rdpsnd = False;
break;
#endif
case '0':
g_console_session = True;
break;
@ -446,7 +458,10 @@ main(int argc, char *argv[])
return 1;
#ifdef WITH_RDPSND
rdpsnd_init();
if (g_rdpsnd)
{
rdpsnd_init();
}
#endif
/* rdpdr_init(); */

5
xwin.c
View File

@ -69,6 +69,7 @@ static int g_move_y_offset = 0;
#ifdef WITH_RDPSND
extern int g_dsp_fd;
extern BOOL g_dsp_busy;
extern BOOL g_rdpsnd;
#endif
/* MWM decorations */
@ -1203,7 +1204,7 @@ ui_select(int rdp_socket)
#ifdef WITH_RDPSND
/* FIXME: there should be an API for registering fds */
if (g_dsp_busy)
if (g_rdpsnd && g_dsp_busy)
{
FD_SET(g_dsp_fd, &wfds);
n = (g_dsp_fd + 1 > n) ? g_dsp_fd + 1 : n;
@ -1223,7 +1224,7 @@ ui_select(int rdp_socket)
return 1;
#ifdef WITH_RDPSND
if (g_dsp_busy && FD_ISSET(g_dsp_fd, &wfds))
if (g_rdpsnd && g_dsp_busy && FD_ISSET(g_dsp_fd, &wfds))
wave_out_play();
#endif
}