/[rdesktop]/sourceforge.net/trunk/rdesktop/rdpsnd_libao.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_libao.c

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

revision 840 by stargo, Tue Mar 8 17:03:08 2005 UTC revision 841 by stargo, Tue Mar 8 17:23:26 2005 UTC
# Line 190  wave_out_play(void) Line 190  wave_out_play(void)
190                  for (i = 0; (i < ((WAVEOUTBUF / 4) * (3 - g_samplewidth))) && (out->p < out->end);                  for (i = 0; (i < ((WAVEOUTBUF / 4) * (3 - g_samplewidth))) && (out->p < out->end);
191                       i++)                       i++)
192                  {                  {
193                            /* On a stereo-channel we must make sure that left and right
194                               does not get mixed up, so we need to expand the sample-
195                               data with channels in mind: 1234 -> 12123434
196                               If we have a mono-channel, we can expand the data by simply
197                               doubling the sample-data: 1234 -> 11223344 */
198                          if (g_channels == 2)                          if (g_channels == 2)
199                                  offset = ((i * 2) - (i & 1)) * g_samplewidth;                                  offset = ((i * 2) - (i & 1)) * g_samplewidth;
200                          else                          else
# Line 197  wave_out_play(void) Line 202  wave_out_play(void)
202    
203                          memcpy(&outbuf[offset], out->p, g_samplewidth);                          memcpy(&outbuf[offset], out->p, g_samplewidth);
204                          memcpy(&outbuf[g_channels * g_samplewidth + offset], out->p, g_samplewidth);                          memcpy(&outbuf[g_channels * g_samplewidth + offset], out->p, g_samplewidth);
                         out->p += 2;  
205    
206                            out->p += g_samplewidth;
207                          len += 2 * g_samplewidth;                          len += 2 * g_samplewidth;
208                  }                  }
209          }          }

Legend:
Removed from v.840  
changed lines
  Added in v.841

  ViewVC Help
Powered by ViewVC 1.1.26