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

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

revision 474 by matthewc, Tue Sep 30 09:11:08 2003 UTC revision 491 by stargo, Mon Oct 13 16:09:45 2003 UTC
# Line 78  rdpsnd_process_negotiate(STREAM in) Line 78  rdpsnd_process_negotiate(STREAM in)
78          unsigned int in_format_count, i;          unsigned int in_format_count, i;
79          WAVEFORMATEX *format;          WAVEFORMATEX *format;
80          STREAM out;          STREAM out;
81            BOOL device_available = False;
82    
83          in_uint8s(in, 14);      /* flags, volume, pitch, UDP port */          in_uint8s(in, 14);      /* flags, volume, pitch, UDP port */
84          in_uint16_le(in, in_format_count);          in_uint16_le(in, in_format_count);
85          in_uint8s(in, 4);       /* pad, status, pad */          in_uint8s(in, 4);       /* pad, status, pad */
86    
87            if (wave_out_open())
88            {
89                    wave_out_close();
90                    device_available = True;
91            }
92    
93          format_count = 0;          format_count = 0;
94          if (s_check_rem(in, 18*in_format_count))          if (s_check_rem(in, 18*in_format_count))
95          {          {
# Line 97  rdpsnd_process_negotiate(STREAM in) Line 104  rdpsnd_process_negotiate(STREAM in)
104                          in_uint16_le(in, format->wBitsPerSample);                          in_uint16_le(in, format->wBitsPerSample);
105                          in_uint16_le(in, format->cbSize);                          in_uint16_le(in, format->cbSize);
106    
107                          if (wave_out_format_supported(format))                          if (device_available && wave_out_format_supported(format))
108                          {                          {
109                                  format_count++;                                  format_count++;
110                                  if (format_count == MAX_FORMATS)                                  if (format_count == MAX_FORMATS)
# Line 155  rdpsnd_process(STREAM s) Line 162  rdpsnd_process(STREAM s)
162  {  {
163          uint8 type;          uint8 type;
164          uint16 datalen;          uint16 datalen;
165            uint32 volume;
166          static uint16 tick, format;          static uint16 tick, format;
167          static uint8 packet_index;          static uint8 packet_index;
168          static BOOL awaiting_data_packet;          static BOOL awaiting_data_packet;
# Line 218  rdpsnd_process(STREAM s) Line 226  rdpsnd_process(STREAM s)
226                  rdpsnd_process_unknown6(s);                  rdpsnd_process_unknown6(s);
227                  break;                  break;
228          case RDPSND_SET_VOLUME:          case RDPSND_SET_VOLUME:
229                  /* uint32 volume */                  in_uint32(s, volume);
230                    if ( device_open )
231                    {
232                            wave_out_volume((volume & 0xffff), (volume & 0xffff0000) >> 16);
233                    }
234                  break;                  break;
235          default:          default:
236                  unimpl("RDPSND packet type %d\n", type);                  unimpl("RDPSND packet type %d\n", type);

Legend:
Removed from v.474  
changed lines
  Added in v.491

  ViewVC Help
Powered by ViewVC 1.1.26