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
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;
}