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

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

revision 1345 by ossman_, Thu Dec 7 11:54:29 2006 UTC revision 1346 by ossman_, Thu Dec 7 15:23:45 2006 UTC
# Line 39  double min_volume, max_volume, volume_ra Line 39  double min_volume, max_volume, volume_ra
39  int resource, maxFillable;  int resource, maxFillable;
40  int combinedFrameSize;  int combinedFrameSize;
41    
42    void sgi_play(void);
43    
44    void
45    sgi_add_fds(int *n, fd_set * rfds, fd_set * wfds, struct timeval *tv)
46    {
47    }
48    
49    void
50    sgi_check_fds(fd_set * rfds, fd_set * wfds)
51    {
52            if (output_port == (ALport) 0)
53                    return;
54    
55            if (!rdpsnd_queue_empty())
56                    sgi_play();
57    }
58    
59  BOOL  BOOL
60  sgi_open(void)  sgi_open(void)
61  {  {
# Line 101  sgi_close(void) Line 118  sgi_close(void)
118          alDiscardFrames(output_port, 0);          alDiscardFrames(output_port, 0);
119    
120          alClosePort(output_port);          alClosePort(output_port);
121            output_port = (ALport) 0;
122          alFreeConfig(audioconfig);          alFreeConfig(audioconfig);
123  #if (defined(IRIX_DEBUG))  #if (defined(IRIX_DEBUG))
124          fprintf(stderr, "sgi_close: returning\n");          fprintf(stderr, "sgi_close: returning\n");
# Line 240  sgi_play(void) Line 258  sgi_play(void)
258          while (1)          while (1)
259          {          {
260                  if (rdpsnd_queue_empty())                  if (rdpsnd_queue_empty())
                 {  
                         g_dsp_busy = False;  
261                          return;                          return;
                 }  
262    
263                  packet = rdpsnd_queue_current_packet();                  packet = rdpsnd_queue_current_packet();
264                  out = &packet->s;                  out = &packet->s;
# Line 265  sgi_play(void) Line 280  sgi_play(void)
280  #if (defined(IRIX_DEBUG))  #if (defined(IRIX_DEBUG))
281  /*                              fprintf(stderr,"Busy playing...\n"); */  /*                              fprintf(stderr,"Busy playing...\n"); */
282  #endif  #endif
                                 g_dsp_busy = True;  
283                                  usleep(10);                                  usleep(10);
284                                  return;                                  return;
285                          }                          }
# Line 277  static struct audio_driver sgi_driver = Line 291  static struct audio_driver sgi_driver =
291          .name = "sgi",          .name = "sgi",
292          .description = "SGI output driver",          .description = "SGI output driver",
293    
294            .add_fds = sgi_add_fds,
295            .check_fds = sgi_check_fds,
296    
297          .wave_out_open = sgi_open,          .wave_out_open = sgi_open,
298          .wave_out_close = sgi_close,          .wave_out_close = sgi_close,
299          .wave_out_format_supported = sgi_format_supported,          .wave_out_format_supported = sgi_format_supported,
300          .wave_out_set_format = sgi_set_format,          .wave_out_set_format = sgi_set_format,
301          .wave_out_volume = sgi_volume,          .wave_out_volume = sgi_volume,
         .wave_out_play = sgi_play,  
302    
303          .need_byteswap_on_be = 1,          .need_byteswap_on_be = 1,
304          .need_resampling = 0,          .need_resampling = 0,

Legend:
Removed from v.1345  
changed lines
  Added in v.1346

  ViewVC Help
Powered by ViewVC 1.1.26