/[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 909 by astrand, Tue Jun 7 11:10:13 2005 UTC
# Line 160  wave_out_set_format(WAVEFORMATEX * pwfx) Line 160  wave_out_set_format(WAVEFORMATEX * pwfx)
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.909

  ViewVC Help
Powered by ViewVC 1.1.26