CVS: rdesktop rdesktop.c, 1.150, 1.151 rdpsnd.c, 1.17, 1.18

Michael Gernoth <[email protected]> Mon, 18 Sep 2006 14:42:52 -0700
Newsgroups gmane.network.rdesktop.cvs
Message-ID <[email protected]>
Update of /cvsroot/rdesktop/rdesktop
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv25436

Modified Files:
	rdesktop.c rdpsnd.c 
Log Message:
handle missing audio-drivers better


Index: rdesktop.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/rdesktop.c,v
retrieving revision 1.150
retrieving revision 1.151
diff -C2 -d -r1.150 -r1.151
*** rdesktop.c	17 Sep 2006 11:04:49 -0000	1.150
--- rdesktop.c	18 Sep 2006 21:42:50 -0000	1.151
***************
*** 691,695 ****
  								}
  
- 								g_rdpsnd = True;
  								if (!rdpsnd_select_driver
  								    (driver, options))
--- 691,694 ----
***************
*** 697,700 ****
--- 696,703 ----
  									warning("Driver not available\n");
  								}
+ 								else
+ 								{
+ 									g_rdpsnd = True;
+ 								}
  							}
  
***************
*** 716,724 ****
  					{
  #ifdef WITH_RDPSND
- 						g_rdpsnd = True;
  						if (!rdpsnd_select_driver(NULL, NULL))
  						{
  							warning("No sound-driver available\n");
  						}
  #else
  						warning("Not compiled with sound support\n");
--- 719,730 ----
  					{
  #ifdef WITH_RDPSND
  						if (!rdpsnd_select_driver(NULL, NULL))
  						{
  							warning("No sound-driver available\n");
  						}
+ 						else
+ 						{
+ 							g_rdpsnd = True;
+ 						}
  #else
  						warning("Not compiled with sound support\n");

Index: rdpsnd.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/rdpsnd.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** rdpsnd.c	17 Sep 2006 20:06:37 -0000	1.17
--- rdpsnd.c	18 Sep 2006 21:42:50 -0000	1.18
***************
*** 290,307 ****
  rdpsnd_auto_open(void)
  {
! 	current_driver = drivers;
! 	while (current_driver != NULL)
  	{
! 		DEBUG(("trying %s...\n", current_driver->name));
! 		if (current_driver->wave_out_open())
  		{
! 			DEBUG(("selected %s\n", current_driver->name));
! 			return True;
  		}
- 		g_dsp_fd = 0;
- 		current_driver = current_driver->next;
- 	}
  
! 	warning("no working audio-driver found\n");
  
  	return False;
--- 290,316 ----
  rdpsnd_auto_open(void)
  {
! 	static BOOL failed = False;
! 
! 	if (!failed)
  	{
! 		struct audio_driver *auto_driver = current_driver;
! 
! 		current_driver = drivers;
! 		while (current_driver != NULL)
  		{
! 			DEBUG(("trying %s...\n", current_driver->name));
! 			if (current_driver->wave_out_open())
! 			{
! 				DEBUG(("selected %s\n", current_driver->name));
! 				return True;
! 			}
! 			g_dsp_fd = 0;
! 			current_driver = current_driver->next;
  		}
  
! 		warning("no working audio-driver found\n");
! 		failed = True;
! 		current_driver = auto_driver;
! 	}
  
  	return False;


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV