/[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 1341 by astrand, Fri Oct 27 12:58:13 2006 UTC revision 1342 by ossman_, Wed Dec 6 13:29:42 2006 UTC
# Line 384  rdpsnd_dsp_resample(unsigned char **out, Line 384  rdpsnd_dsp_resample(unsigned char **out,
384  }  }
385    
386  STREAM  STREAM
387  rdpsnd_dsp_process(STREAM s, struct audio_driver * current_driver, WAVEFORMATEX * format)  rdpsnd_dsp_process(unsigned char *data, unsigned int size, struct audio_driver * current_driver,
388                       WAVEFORMATEX * format)
389  {  {
390          static struct stream out;          static struct stream out;
391          BOOL stream_be = False;          BOOL stream_be = False;
# Line 392  rdpsnd_dsp_process(STREAM s, struct audi Line 393  rdpsnd_dsp_process(STREAM s, struct audi
393          /* softvol and byteswap do not change the amount of data they          /* softvol and byteswap do not change the amount of data they
394             return, so they can operate on the input-stream */             return, so they can operate on the input-stream */
395          if (current_driver->wave_out_volume == rdpsnd_dsp_softvol_set)          if (current_driver->wave_out_volume == rdpsnd_dsp_softvol_set)
396                  rdpsnd_dsp_softvol(s->data, s->size, format);                  rdpsnd_dsp_softvol(data, size, format);
397    
398  #ifdef B_ENDIAN  #ifdef B_ENDIAN
399          if (current_driver->need_byteswap_on_be)          if (current_driver->need_byteswap_on_be)
400          {          {
401                  rdpsnd_dsp_swapbytes(s->data, s->size, format);                  rdpsnd_dsp_swapbytes(data, size, format);
402                  stream_be = True;                  stream_be = True;
403          }          }
404  #endif  #endif
# Line 405  rdpsnd_dsp_process(STREAM s, struct audi Line 406  rdpsnd_dsp_process(STREAM s, struct audi
406          out.data = NULL;          out.data = NULL;
407    
408          if (current_driver->need_resampling)          if (current_driver->need_resampling)
409                  out.size = rdpsnd_dsp_resample(&out.data, s->data, s->size, format, stream_be);                  out.size = rdpsnd_dsp_resample(&out.data, data, size, format, stream_be);
410    
411          if (out.data == NULL)          if (out.data == NULL)
412          {          {
413                  out.data = xmalloc(s->size);                  out.data = xmalloc(size);
414                  memcpy(out.data, s->data, s->size);                  memcpy(out.data, data, size);
415                  out.size = s->size;                  out.size = size;
416          }          }
417    
418          out.p = out.data;          out.p = out.data;

Legend:
Removed from v.1341  
changed lines
  Added in v.1342

  ViewVC Help
Powered by ViewVC 1.1.26