summaryrefslogtreecommitdiffstats
path: root/polyp/protocol-native.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-09-01 00:23:51 +0000
committerLennart Poettering <lennart@poettering.net>2004-09-01 00:23:51 +0000
commit34fe8bd893ed9c7531bc4898b934ef9d4cdf3e68 (patch)
tree816a8543d3521eb43fb49c67af33afc44769bd91 /polyp/protocol-native.c
parent9618aea5df5bf2c5069575f28a935c2039fc55e0 (diff)
add support for SCHED_FIFO
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@163 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/protocol-native.c')
-rw-r--r--polyp/protocol-native.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/polyp/protocol-native.c b/polyp/protocol-native.c
index 213568a0..9c6996be 100644
--- a/polyp/protocol-native.c
+++ b/polyp/protocol-native.c
@@ -421,6 +421,8 @@ static int sink_input_peek_cb(struct pa_sink_input *i, struct pa_memchunk *chunk
assert(i && i->userdata && chunk);
s = i->userdata;
+ /*fprintf(stderr, "%3.0f \r", (double) pa_memblockq_get_length(s->memblockq)/pa_memblockq_get_tlength(s->memblockq)*100);*/
+
if (pa_memblockq_peek(s->memblockq, chunk) < 0)
return -1;
@@ -1360,6 +1362,7 @@ static void command_flush_or_trigger_playback_stream(struct pa_pdispatch *pd, ui
else {
assert(command == PA_COMMAND_FLUSH_PLAYBACK_STREAM);
pa_memblockq_flush(s->memblockq);
+ /*fprintf(stderr, "flush: %u\n", pa_memblockq_get_length(s->memblockq));*/
}
pa_sink_notify(s->sink_input->sink);
@@ -1427,7 +1430,8 @@ static void pstream_memblock_callback(struct pa_pstream *p, uint32_t channel, ui
l = chunk->length;
if (l > 0) {
- memcpy(u->memchunk.memblock->data + u->memchunk.index + u->memchunk.length, chunk->memblock->data+chunk->index, l);
+ memcpy((uint8_t*) u->memchunk.memblock->data + u->memchunk.index + u->memchunk.length,
+ (uint8_t*) chunk->memblock->data+chunk->index, l);
u->memchunk.length += l;
u->length -= l;
}
@@ -1439,7 +1443,7 @@ static void pstream_die_callback(struct pa_pstream *p, void *userdata) {
assert(p && c);
connection_free(c);
- fprintf(stderr, "protocol-native: connection died.\n");
+/* fprintf(stderr, "protocol-native: connection died.\n");*/
}