/[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 897 by stargo, Sat Apr 30 09:13:13 2005 UTC revision 912 by stargo, Sun Jun 26 22:36:44 2005 UTC
# Line 77  wave_out_open(void) Line 77  wave_out_open(void)
77          queue_lo = queue_hi = 0;          queue_lo = queue_hi = 0;
78    
79          audioconfig = alNewConfig();          audioconfig = alNewConfig();
80          if (audioconfig < 0)          if (audioconfig == (ALconfig) 0)
81          {          {
82                  fprintf(stderr, "wave_out_open: alNewConfig failed: %s\n",                  fprintf(stderr, "wave_out_open: alNewConfig failed: %s\n",
83                          alGetErrorString(oserror()));                          alGetErrorString(oserror()));
# Line 159  wave_out_set_format(WAVEFORMATEX * pwfx) Line 159  wave_out_set_format(WAVEFORMATEX * pwfx)
159  #endif  #endif
160          }          }
161    
162          /* Limited support to configure an opened audio port in IRIX The          /* Limited support to configure an opened audio port in IRIX.  The
163           number of channels is a static setting and can not be changed after             number of channels is a static setting and can not be changed after
164           a port is opened. So if the number of channels remains the same, we             a port is opened.  So if the number of channels remains the same, we
165           can configure other settings Otherwise we have to reopen the audio             can configure other settings; otherwise we have to reopen the audio
166           port, using same config. */             port, using same config. */
167    
168          channels = pwfx->nChannels;          channels = pwfx->nChannels;
169          g_snd_rate = pwfx->nSamplesPerSec;          g_snd_rate = pwfx->nSamplesPerSec;
170    
171          alSetSampFmt(audioconfig, AL_SAMPFMT_TWOSCOMP);          alSetSampFmt(audioconfig, AL_SAMPFMT_TWOSCOMP);
172          alSetWidth(audioconfig, width);          alSetWidth(audioconfig, width);
173          if ( channels != alGetChannels(audioconfig) )          if (channels != alGetChannels(audioconfig))
174          {          {
175                  alClosePort(output_port);                  alClosePort(output_port);
176                  alSetChannels(audioconfig, channels);                  alSetChannels(audioconfig, channels);
# Line 179  wave_out_set_format(WAVEFORMATEX * pwfx) Line 179  wave_out_set_format(WAVEFORMATEX * pwfx)
179                  if (output_port == (ALport) 0)                  if (output_port == (ALport) 0)
180                  {                  {
181                          fprintf(stderr, "wave_out_set_format: alOpenPort failed: %s\n",                          fprintf(stderr, "wave_out_set_format: alOpenPort failed: %s\n",
182                                                          alGetErrorString(oserror()));                                  alGetErrorString(oserror()));
183                          return False;                          return False;
184                  }                  }
185    
# Line 319  wave_out_play(void) Line 319  wave_out_play(void)
319                  if (out->p == out->end)                  if (out->p == out->end)
320                  {                  {
321                          gf = alGetFilled(output_port);                          gf = alGetFilled(output_port);
322                          if ( gf < (4 * maxFillable / 10) )                          if (gf < (4 * maxFillable / 10))
323                          {                          {
324                                  rdpsnd_send_completion(packet->tick, packet->index);                                  rdpsnd_send_completion(packet->tick, packet->index);
325                                  free(out->data);                                  free(out->data);

Legend:
Removed from v.897  
changed lines
  Added in v.912

  ViewVC Help
Powered by ViewVC 1.1.26