CVS: rdesktop rdpsnd_oss.c,1.10,1.11

Michael Gernoth <[email protected]>
Newsgroups gmane.network.rdesktop.cvs
Message-ID <[email protected]>
Update of /cvsroot/rdesktop/rdesktop
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1931

Modified Files:
	rdpsnd_oss.c 
Log Message:
fix for esddsp, which does not implement the SNDCTL_DSP_CHANNELS ioctl


Index: rdpsnd_oss.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/rdpsnd_oss.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** rdpsnd_oss.c	23 Aug 2004 11:13:50 -0000	1.10
--- rdpsnd_oss.c	3 Sep 2004 18:04:48 -0000	1.11
***************
*** 86,90 ****
  wave_out_set_format(WAVEFORMATEX * pwfx)
  {
! 	int channels, format;
  
  	ioctl(g_dsp_fd, SNDCTL_DSP_RESET, NULL);
--- 86,90 ----
  wave_out_set_format(WAVEFORMATEX * pwfx)
  {
! 	int stereo, format;
  
  	ioctl(g_dsp_fd, SNDCTL_DSP_RESET, NULL);
***************
*** 105,119 ****
  	}
  
! 	channels = pwfx->nChannels;
! 	if (ioctl(g_dsp_fd, SNDCTL_DSP_CHANNELS, &channels) == -1)
  	{
! 		perror("SNDCTL_DSP_CHANNELS");
! 		close(g_dsp_fd);
! 		return False;
  	}
  
! 	if (channels == 2)
  	{
! 		g_samplewidth *= 2;
  	}
  
--- 105,123 ----
  	}
  
! 	if (pwfx->nChannels == 2)
  	{
! 		stereo = 1;
! 		g_samplewidth *= 2;
! 	}
! 	else
! 	{
! 		stereo = 0;
  	}
  
! 	if (ioctl(g_dsp_fd, SNDCTL_DSP_STEREO, &stereo) == -1)
  	{
! 		perror("SNDCTL_DSP_CHANNELS");
! 		close(g_dsp_fd);
! 		return False;
  	}
  



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.