21 |
|
|
22 |
#include "rdesktop.h" |
#include "rdesktop.h" |
23 |
#include "rdpsnd.h" |
#include "rdpsnd.h" |
24 |
|
#include "rdpsnd_dsp.h" |
25 |
|
|
26 |
#define RDPSND_CLOSE 1 |
#define RDPSND_CLOSE 1 |
27 |
#define RDPSND_WRITE 2 |
#define RDPSND_WRITE 2 |
394 |
queue_hi = next_hi; |
queue_hi = next_hi; |
395 |
|
|
396 |
packet->s = *s; |
packet->s = *s; |
397 |
|
packet->s.data = |
398 |
|
rdpsnd_dsp_process(s->data, s->size, current_driver, &formats[current_format]); |
399 |
|
packet->s.p = packet->s.data + 4; |
400 |
|
packet->s.end = packet->s.data + s->size; |
401 |
packet->tick = tick; |
packet->tick = tick; |
402 |
packet->index = index; |
packet->index = index; |
|
packet->s.p += 4; |
|
403 |
|
|
404 |
|
#if 0 /* Handled by DSP */ |
405 |
/* we steal the data buffer from s, give it a new one */ |
/* we steal the data buffer from s, give it a new one */ |
406 |
s->data = malloc(s->size); |
s->data = xmalloc(s->size); |
407 |
|
#endif |
408 |
|
|
409 |
if (!g_dsp_busy) |
if (!g_dsp_busy) |
410 |
current_driver->wave_out_play(); |
current_driver->wave_out_play(); |
431 |
inline void |
inline void |
432 |
rdpsnd_queue_next(void) |
rdpsnd_queue_next(void) |
433 |
{ |
{ |
434 |
free(packet_queue[queue_lo].s.data); |
xfree(packet_queue[queue_lo].s.data); |
435 |
queue_lo = (queue_lo + 1) % MAX_QUEUE; |
queue_lo = (queue_lo + 1) % MAX_QUEUE; |
436 |
} |
} |
437 |
|
|