chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Suppress IO buffering when running tests
[disorder]
/
clients
/
playrtp-alsa.c
diff --git
a/clients/playrtp-alsa.c
b/clients/playrtp-alsa.c
index ceea87b8df9a76fcc54c8f50ed297a63f1ee2b0b..142f1eef72823dbbfbd43c2e4aa1727a1c203888 100644
(file)
--- a/
clients/playrtp-alsa.c
+++ b/
clients/playrtp-alsa.c
@@
-23,13
+23,14
@@
#include <config.h>
#include <config.h>
-#if
API_ALSA
+#if
HAVE_ALSA_ASOUNDLIB_H
#include "types.h"
#include <poll.h>
#include <alsa/asoundlib.h>
#include <assert.h>
#include <pthread.h>
#include "types.h"
#include <poll.h>
#include <alsa/asoundlib.h>
#include <assert.h>
#include <pthread.h>
+#include <arpa/inet.h>
#include "mem.h"
#include "log.h"
#include "mem.h"
#include "log.h"
@@
-141,6
+142,15
@@
static int playrtp_alsa_writei(const void *s, size_t n) {
} else {
/* Success */
next_timestamp += frames_written * 2;
} else {
/* Success */
next_timestamp += frames_written * 2;
+ if(dump_buffer) {
+ snd_pcm_sframes_t count;
+ const int16_t *sp = s;
+
+ for(count = 0; count < frames_written * 2; ++count) {
+ dump_buffer[dump_index++] = (int16_t)ntohs(*sp++);
+ dump_index %= dump_size;
+ }
+ }
return 0;
}
}
return 0;
}
}