79 |
WAVEFORMATEX *format; |
WAVEFORMATEX *format; |
80 |
STREAM out; |
STREAM out; |
81 |
BOOL device_available = False; |
BOOL device_available = False; |
82 |
|
int readcnt; |
83 |
|
int discardcnt; |
84 |
|
|
85 |
in_uint8s(in, 14); /* flags, volume, pitch, UDP port */ |
in_uint8s(in, 14); /* flags, volume, pitch, UDP port */ |
86 |
in_uint16_le(in, in_format_count); |
in_uint16_le(in, in_format_count); |
106 |
in_uint16_le(in, format->wBitsPerSample); |
in_uint16_le(in, format->wBitsPerSample); |
107 |
in_uint16_le(in, format->cbSize); |
in_uint16_le(in, format->cbSize); |
108 |
|
|
109 |
|
/* read in the buffer of unknown use */ |
110 |
|
readcnt = format->cbSize; |
111 |
|
discardcnt = 0; |
112 |
|
if (format->cbSize > MAX_CBSIZE) |
113 |
|
{ |
114 |
|
fprintf(stderr, "cbSize too large for buffer: %d\n", format->cbSize); |
115 |
|
readcnt = MAX_CBSIZE; |
116 |
|
discardcnt = format->cbSize - MAX_CBSIZE; |
117 |
|
} |
118 |
|
in_uint8a(in, format->cb, readcnt); |
119 |
|
in_uint8s(in, discardcnt); |
120 |
|
|
121 |
if (device_available && wave_out_format_supported(format)) |
if (device_available && wave_out_format_supported(format)) |
122 |
{ |
{ |
123 |
format_count++; |
format_count++; |