--- sourceforge.net/trunk/rdesktop/rdesktop.c 2006/04/12 06:47:24 1226 +++ sourceforge.net/trunk/rdesktop/rdesktop.c 2006/09/21 19:00:11 1272 @@ -179,8 +179,13 @@ fprintf(stderr, " '-r printer:mydeskjet': enable printer redirection\n"); fprintf(stderr, " or mydeskjet=\"HP LaserJet IIIP\" to enter server driver as well\n"); - fprintf(stderr, " '-r sound:[local|off|remote]': enable sound redirection\n"); +#ifdef WITH_RDPSND + fprintf(stderr, + " '-r sound:[local[:driver[:device]]|off|remote]': enable sound redirection\n"); fprintf(stderr, " remote would leave sound on server\n"); + fprintf(stderr, " available drivers for 'local':\n"); + rdpsnd_show_help(); +#endif fprintf(stderr, " '-r clipboard:[off|PRIMARYCLIPBOARD|CLIPBOARD]': enable clipboard\n"); fprintf(stderr, " redirection.\n"); @@ -403,6 +408,7 @@ BOOL geometry_option = False; int run_count = 0; /* Session Directory support */ BOOL continue_connect = True; /* Session Directory support */ + char *rdpsnd_optarg = NULL; #ifdef HAVE_LOCALE_H /* Set locale according to environment */ @@ -663,7 +669,12 @@ if (str_startswith(optarg, "local")) #ifdef WITH_RDPSND + { + rdpsnd_optarg = + next_arg(optarg, ':'); g_rdpsnd = True; + } + #else warning("Not compiled with sound support\n"); #endif @@ -876,7 +887,12 @@ #ifdef WITH_RDPSND if (g_rdpsnd) - rdpsnd_init(); + { + if (!rdpsnd_init(rdpsnd_optarg)) + { + warning("Initializing sound-support failed!\n"); + } + } #endif if (lspci_enabled)