X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/313acc774bff2f76f41ca75cbca43ff3f0ad20cc..011e0b894ce9b8ccadc797860ba126dee957b0fe:/clients/playrtp-oss.c diff --git a/clients/playrtp-oss.c b/clients/playrtp-oss.c index 7281e15..b40947d 100644 --- a/clients/playrtp-oss.c +++ b/clients/playrtp-oss.c @@ -38,6 +38,7 @@ #include #include #include +#include #include "mem.h" #include "log.h" @@ -138,6 +139,15 @@ static int playrtp_oss_flush(void) { if(nbyteswritten < playrtp_oss_bufsize) error(0, "%s: short write (%d/%d)", device, nbyteswritten, playrtp_oss_bufsize); + if(dump_buffer) { + int count; + const int16_t *sp = (const int16_t *)playrtp_oss_buffer; + + for(count = 0; count < playrtp_oss_bufsize; count += sizeof(int16_t)) { + dump_buffer[dump_index++] = (int16_t)ntohs(*sp++); + dump_index %= dump_size; + } + } playrtp_oss_bufused = 0; return 0; }