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

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

revision 510 by stargo, Thu Oct 23 11:11:31 2003 UTC revision 532 by astrand, Wed Oct 29 14:14:46 2003 UTC
# Line 135  wave_out_volume(uint16 left, uint16 righ Line 135  wave_out_volume(uint16 left, uint16 righ
135    
136          if (use_dev_mixer)          if (use_dev_mixer)
137          {          {
138                  if ((fd_mix = open( "/dev/mixer", O_RDWR|O_NONBLOCK )) == -1 )                  if ((fd_mix = open("/dev/mixer", O_RDWR | O_NONBLOCK)) == -1)
139                  {                  {
140                          perror("open /dev/mixer");                          perror("open /dev/mixer");
141                          return;                          return;
# Line 228  wave_out_play(void) Line 228  wave_out_play(void)
228                  {                  {
229                          long long duration;                          long long duration;
230                          long elapsed;                          long elapsed;
231                            
232                          gettimeofday(&tv, NULL);                          gettimeofday(&tv, NULL);
233                          duration =                          duration = (out->size * (1000000 / (g_samplewidth * g_snd_rate)));
234                                  (out->size * (1000000 /                          elapsed = (tv.tv_sec - startedat_s) * 1000000 + (tv.tv_usec - startedat_us);
                                 (g_samplewidth * g_snd_rate)));  
                         elapsed =  
                                 (tv.tv_sec - startedat_s) * 1000000 +  
                                 (tv.tv_usec - startedat_us);  
235    
236                          if ( elapsed >= (duration * 7) / 10 )                          if (elapsed >= (duration * 7) / 10)
237                          {                          {
238                                  rdpsnd_send_completion(packet->tick, packet->index);                                  rdpsnd_send_completion(packet->tick, packet->index);
239                                  free(out->data);                                  free(out->data);

Legend:
Removed from v.510  
changed lines
  Added in v.532

  ViewVC Help
Powered by ViewVC 1.1.26