/[rdesktop]/sourceforge.net/trunk/rdesktop/rdpsnd_dsp.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/rdpsnd_dsp.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1292 by stargo, Mon Oct 2 08:01:24 2006 UTC revision 1303 by stargo, Thu Oct 26 22:26:16 2006 UTC
# Line 308  rdpsnd_dsp_resample(unsigned char **out, Line 308  rdpsnd_dsp_resample(unsigned char **out,
308                  if (source * resample_to_channels + samplewidth > size)                  if (source * resample_to_channels + samplewidth > size)
309                          break;                          break;
310    
311  #if 0                           /* Linear resampling, TODO: soundquality fixes */  #if 0                           /* Linear resampling, TODO: soundquality fixes (LP filter) */
312                  if (samplewidth == 1)                  if (samplewidth == 1)
313                  {                  {
314                          sint8 cval1, cval2;                          sint8 cval1, cval2;
# Line 321  rdpsnd_dsp_resample(unsigned char **out, Line 321  rdpsnd_dsp_resample(unsigned char **out,
321                                         in + ((source + 1) * resample_to_channels * samplewidth) +                                         in + ((source + 1) * resample_to_channels * samplewidth) +
322                                         (samplewidth * j), samplewidth);                                         (samplewidth * j), samplewidth);
323    
324                                  cval1 += (cval2 * part) / 100;                                  cval1 += (sint8)(cval2 * part) / 100;
325    
326                                  memcpy(*out + (i * resample_to_channels * samplewidth) +                                  memcpy(*out + (i * resample_to_channels * samplewidth) +
327                                         (samplewidth * j), &cval1, samplewidth);                                         (samplewidth * j), &cval1, samplewidth);
# Line 339  rdpsnd_dsp_resample(unsigned char **out, Line 339  rdpsnd_dsp_resample(unsigned char **out,
339                                         in + ((source + 1) * resample_to_channels * samplewidth) +                                         in + ((source + 1) * resample_to_channels * samplewidth) +
340                                         (samplewidth * j), samplewidth);                                         (samplewidth * j), samplewidth);
341    
342                                  sval1 += (sval2 * part) / 100;                                  sval1 += (sint16)(sval2 * part) / 100;
343    
344                                  memcpy(*out + (i * resample_to_channels * samplewidth) +                                  memcpy(*out + (i * resample_to_channels * samplewidth) +
345                                         (samplewidth * j), &sval1, samplewidth);                                         (samplewidth * j), &sval1, samplewidth);

Legend:
Removed from v.1292  
changed lines
  Added in v.1303

  ViewVC Help
Powered by ViewVC 1.1.26