64 |
struct audio_packet packet_queue[MAX_QUEUE]; |
struct audio_packet packet_queue[MAX_QUEUE]; |
65 |
|
|
66 |
static char record_buffer[8192]; |
static char record_buffer[8192]; |
67 |
static int record_buffer_size; |
static uint32 record_buffer_size; |
68 |
|
|
69 |
static uint8 packet_opcode; |
static uint8 packet_opcode; |
70 |
static struct stream packet; |
static struct stream packet; |
153 |
void |
void |
154 |
rdpsnd_record(const void *data, unsigned int size) |
rdpsnd_record(const void *data, unsigned int size) |
155 |
{ |
{ |
156 |
int remain; |
uint32 remain; |
157 |
|
|
158 |
assert(rec_device_open); |
assert(rec_device_open); |
159 |
|
|
263 |
in_uint8a(in, format->cb, readcnt); |
in_uint8a(in, format->cb, readcnt); |
264 |
in_uint8s(in, discardcnt); |
in_uint8s(in, discardcnt); |
265 |
|
|
266 |
if (device_available && current_driver->wave_out_format_supported(format)) |
if (current_driver && current_driver->wave_out_format_supported(format)) |
267 |
{ |
{ |
268 |
format_count++; |
format_count++; |
269 |
if (format_count == MAX_FORMATS) |
if (format_count == MAX_FORMATS) |
376 |
in_uint8a(in, format->cb, readcnt); |
in_uint8a(in, format->cb, readcnt); |
377 |
in_uint8s(in, discardcnt); |
in_uint8s(in, discardcnt); |
378 |
|
|
379 |
if (device_available && current_driver->wave_in_format_supported(format)) |
if (current_driver && current_driver->wave_in_format_supported |
380 |
|
&& current_driver->wave_in_format_supported(format)) |
381 |
{ |
{ |
382 |
rec_format_count++; |
rec_format_count++; |
383 |
if (rec_format_count == MAX_FORMATS) |
if (rec_format_count == MAX_FORMATS) |
611 |
|
|
612 |
pkglen = s->end - s->p; |
pkglen = s->end - s->p; |
613 |
/* str_handle_lines requires null terminated strings */ |
/* str_handle_lines requires null terminated strings */ |
614 |
buf = xmalloc(pkglen + 1); |
buf = (char *) xmalloc(pkglen + 1); |
615 |
STRNCPY(buf, (char *) s->p, pkglen + 1); |
STRNCPY(buf, (char *) s->p, pkglen + 1); |
616 |
|
|
617 |
str_handle_lines(buf, &rest, rdpsnddbg_line_handler, NULL); |
str_handle_lines(buf, &rest, rdpsnddbg_line_handler, NULL); |
663 |
|
|
664 |
drivers = NULL; |
drivers = NULL; |
665 |
|
|
666 |
packet.data = xmalloc(65536); |
packet.data = (uint8 *) xmalloc(65536); |
667 |
packet.p = packet.end = packet.data; |
packet.p = packet.end = packet.data; |
668 |
packet.size = 0; |
packet.size = 0; |
669 |
|
|