CVS: rdesktop rdpsnd_libao.c,1.3,1.4

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-serv12988

Modified Files:
	rdpsnd_libao.c 
Log Message:
indent fixes


Index: rdpsnd_libao.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/rdpsnd_libao.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** rdpsnd_libao.c	8 Mar 2005 12:09:20 -0000	1.3
--- rdpsnd_libao.c	8 Mar 2005 12:16:22 -0000	1.4
***************
*** 117,121 ****
  	g_samplewidth = pwfx->wBitsPerSample / 8;
  
! 	if(o_device != NULL)
  		ao_close(o_device);
  
--- 117,121 ----
  	g_samplewidth = pwfx->wBitsPerSample / 8;
  
! 	if (o_device != NULL)
  		ao_close(o_device);
  
***************
*** 166,171 ****
  	struct audio_packet *packet;
  	STREAM out;
! 	unsigned char expanded[WAVEOUTBUF];
! 	int offset,len,i;
  
  	if (queue_lo == queue_hi)
--- 166,171 ----
  	struct audio_packet *packet;
  	STREAM out;
! 	unsigned char outbuf[WAVEOUTBUF];
! 	int offset, len, i;
  
  	if (queue_lo == queue_hi)
***************
*** 180,197 ****
  	len = 0;
  
! 	if (g_samplerate == 22050 )
  	{
  		/* Resample to 44100 */
! 		for(i=0; (i<((WAVEOUTBUF/8)*(3-g_samplewidth))) && (out->p < out->end); i++)
  		{
! 			offset=i*4*g_samplewidth;
! 			memcpy(&expanded[0*g_samplewidth+offset],out->p,g_samplewidth);
! 			memcpy(&expanded[2*g_samplewidth+offset],out->p,g_samplewidth);
  			out->p += 2;
  
! 			memcpy(&expanded[1*g_samplewidth+offset],out->p,g_samplewidth);
! 			memcpy(&expanded[3*g_samplewidth+offset],out->p,g_samplewidth);
  			out->p += 2;
! 			len += 4*g_samplewidth;
  		}
  	}
--- 180,198 ----
  	len = 0;
  
! 	if (g_samplerate == 22050)
  	{
  		/* Resample to 44100 */
! 		for (i = 0; (i < ((WAVEOUTBUF / 8) * (3 - g_samplewidth))) && (out->p < out->end);
! 		     i++)
  		{
! 			offset = i * 4 * g_samplewidth;
! 			memcpy(&outbuf[0 * g_samplewidth + offset], out->p, g_samplewidth);
! 			memcpy(&outbuf[2 * g_samplewidth + offset], out->p, g_samplewidth);
  			out->p += 2;
  
! 			memcpy(&outbuf[1 * g_samplewidth + offset], out->p, g_samplewidth);
! 			memcpy(&outbuf[3 * g_samplewidth + offset], out->p, g_samplewidth);
  			out->p += 2;
! 			len += 4 * g_samplewidth;
  		}
  	}
***************
*** 199,207 ****
  	{
  		len = (WAVEOUTBUF > (out->end - out->p)) ? (out->end - out->p) : WAVEOUTBUF;
! 		memcpy(expanded,out->p,len);
  		out->p += len;
  	}
  
! 	ao_play(o_device, expanded, len);
  
  	if (out->p == out->end)
--- 200,208 ----
  	{
  		len = (WAVEOUTBUF > (out->end - out->p)) ? (out->end - out->p) : WAVEOUTBUF;
! 		memcpy(outbuf, out->p, len);
  		out->p += len;
  	}
  
! 	ao_play(o_device, outbuf, len);
  
  	if (out->p == out->end)



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&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.