correct a recording bug in native protocol
authorLennart Poettering <lennart@poettering.net>
Mon, 6 Sep 2004 18:55:47 +0000 (18:55 +0000)
committerLennart Poettering <lennart@poettering.net>
Mon, 6 Sep 2004 18:55:47 +0000 (18:55 +0000)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@181 fefdeb5f-60dc-0310-8127-8f9354f1896f

doc/todo
polyp/Makefile.am
polyp/protocol-native.c
polyp/sink.c

index 62debb6ee3ef621e99dabd5104d90215541866fb..f48859e068f54d480c8d0fde90ebcec99a34ca89 100644 (file)
--- a/doc/todo
+++ b/doc/todo
@@ -14,6 +14,7 @@
 - config file for command line arguments
 - vumeter
 - add FAQ
+- pa_context_connect_spawn() change function to fork+exec+waitpid-like function
 
 ** later ***
 - xmlrpc/http
index 27ada2e19b23cb3e34afdb70ca1ba538c7345060..39215497298ffda9e35d190075179743af8cd251 100644 (file)
@@ -398,11 +398,11 @@ mainloop_test_glib12_SOURCES = $(mainloop_test_SOURCES)
 mainloop_test_glib12_CFLAGS = $(mainloop_test_CFLAGS) $(GLIB12_CFLAGS) -DGLIB_MAIN_LOOP
 mainloop_test_glib12_LDADD = $(mainloop_test_LDADD) $(GLIB12_LIBS) libpolyp-mainloop-glib12.la
 
-cpulimit_test_SOURCES = cpulimit-test.c cpulimit.c util.c
+cpulimit_test_SOURCES = cpulimit-test.c cpulimit.c util.c log.c
 cpulimit_test_CFLAGS = $(AM_CFLAGS)
 cpulimit_test_LDADD = $(AM_LDADD) libpolyp-mainloop.la
 
-cpulimit_test2_SOURCES = cpulimit-test.c cpulimit.c util.c
+cpulimit_test2_SOURCES = cpulimit-test.c cpulimit.c util.c log.c
 cpulimit_test2_CFLAGS = $(AM_CFLAGS) -DTEST2
 cpulimit_test2_LDADD = $(AM_LDADD) libpolyp-mainloop.la
 
index 67352b3f24559a6da52e32fc8b95fa10b2407a76..1ec1b6088bdd93f3b8174cd7dc9c4a4bb6a35bc1 100644 (file)
@@ -378,12 +378,14 @@ static void send_memblock(struct connection *c) {
             return;
 
         if (pa_memblockq_peek(r->memblockq,  &chunk) >= 0) {
-            if (chunk.length > r->fragment_size)
-                chunk.length = r->fragment_size;
+            struct pa_memchunk schunk = chunk;
+            
+            if (schunk.length > r->fragment_size)
+                schunk.length = r->fragment_size;
 
-            pa_pstream_send_memblock(c->pstream, r->index, 0, &chunk);
-            pa_memblockq_drop(r->memblockq, &chunk, chunk.length);
-            pa_memblock_unref(chunk.memblock);
+            pa_pstream_send_memblock(c->pstream, r->index, 0, &schunk);
+            pa_memblockq_drop(r->memblockq, &chunk, schunk.length);
+            pa_memblock_unref(schunk.memblock);
             
             return;
         }
index 9b8a6492c916902e56c0abd25541a3f29a806de4..1fe38e9f919b068279f15bda82c9e821783b75a8 100644 (file)
@@ -158,7 +158,7 @@ int pa_sink_render(struct pa_sink*s, size_t length, struct pa_memchunk *result)
     unsigned n;
     size_t l;
     assert(s && length && result);
-    
+
     n = fill_mix_info(s, info, MAX_MIX_CHANNELS);
 
     if (n <= 0)