CVS: rdesktop rdpsnd_libao.c,1.6,1.7
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-serv31372
Modified Files:
rdpsnd_libao.c
Log Message:
bugfix: correctly increment the out->p pointer
Index: rdpsnd_libao.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/rdpsnd_libao.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** rdpsnd_libao.c 8 Mar 2005 17:03:08 -0000 1.6
--- rdpsnd_libao.c 8 Mar 2005 17:23:26 -0000 1.7
***************
*** 191,194 ****
--- 191,199 ----
i++)
{
+ /* On a stereo-channel we must make sure that left and right
+ does not get mixed up, so we need to expand the sample-
+ data with channels in mind: 1234 -> 12123434
+ If we have a mono-channel, we can expand the data by simply
+ doubling the sample-data: 1234 -> 11223344 */
if (g_channels == 2)
offset = ((i * 2) - (i & 1)) * g_samplewidth;
***************
*** 198,203 ****
memcpy(&outbuf[offset], out->p, g_samplewidth);
memcpy(&outbuf[g_channels * g_samplewidth + offset], out->p, g_samplewidth);
- out->p += 2;
len += 2 * g_samplewidth;
}
--- 203,208 ----
memcpy(&outbuf[offset], out->p, g_samplewidth);
memcpy(&outbuf[g_channels * g_samplewidth + offset], out->p, g_samplewidth);
+ out->p += g_samplewidth;
len += 2 * g_samplewidth;
}
-------------------------------------------------------
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