/[rdesktop]/sourceforge.net/trunk/rdesktop/rdpsnd_sun.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_sun.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 561 by stargo, Thu Dec 11 15:07:04 2003 UTC
# Line 26  Line 26 
26  #include <errno.h>  #include <errno.h>
27  #include <sys/ioctl.h>  #include <sys/ioctl.h>
28  #include <sys/audioio.h>  #include <sys/audioio.h>
29    
30    #if (defined(sun) && (defined(__svr4__) || defined(__SVR4)))
31  #include <stropts.h>  #include <stropts.h>
32    #endif
33    
34  #define MAX_QUEUE       10  #define MAX_QUEUE       10
35    
# Line 80  wave_out_close(void) Line 83  wave_out_close(void)
83                  queue_lo = (queue_lo + 1) % MAX_QUEUE;                  queue_lo = (queue_lo + 1) % MAX_QUEUE;
84          }          }
85    
86    #if defined I_FLUSH && defined FLUSHW
87          /* Flush the audiobuffer */          /* Flush the audiobuffer */
88          ioctl(g_dsp_fd, I_FLUSH, FLUSHW);          ioctl(g_dsp_fd, I_FLUSH, FLUSHW);
89    #endif
90    #if defined AUDIO_FLUSH
91            ioctl(g_dsp_fd, AUDIO_FLUSH, NULL);
92    #endif
93          close(g_dsp_fd);          close(g_dsp_fd);
94  }  }
95    
# Line 124  wave_out_set_format(WAVEFORMATEX * pwfx) Line 132  wave_out_set_format(WAVEFORMATEX * pwfx)
132    
133          if (pwfx->nChannels == 1)          if (pwfx->nChannels == 1)
134          {          {
135                  info.play.channels = AUDIO_CHANNELS_MONO;                  info.play.channels = 1;
136          }          }
137          else if (pwfx->nChannels == 2)          else if (pwfx->nChannels == 2)
138          {          {
139                  info.play.channels = AUDIO_CHANNELS_STEREO;                  info.play.channels = 2;
140                  g_samplewidth *= 2;                  g_samplewidth *= 2;
141          }          }
142    

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

  ViewVC Help
Powered by ViewVC 1.1.26