From b83262a1c025d0775d0f73c87341d71d7f1c3996 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Fri, 22 Nov 2013 09:25:53 +0100 Subject: audio: Pull and send the recorded buffer from the main thread Tests showed this lets the appsink pull more buffers, since the streaming thread is not blocked due to network write. --- src/cmumble.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/cmumble.c') diff --git a/src/cmumble.c b/src/cmumble.c index 247d661..0b3a6f5 100644 --- a/src/cmumble.c +++ b/src/cmumble.c @@ -358,6 +358,10 @@ int main(int argc, char **argv) cm.loop = g_main_loop_new(NULL, FALSE); cm.callbacks = (const callback_t *) &callbacks; + cm.async_queue = g_async_queue_new_full(g_free); + if (cm.async_queue == NULL) + return 1; + cmumble_commands_init(&cm); if (cmumble_connection_init(&cm, host, port) < 0) return 1; @@ -375,6 +379,7 @@ int main(int argc, char **argv) cmumble_io_fini(&cm); cmumble_audio_fini(&cm); cmumble_connection_fini(&cm); + g_async_queue_unref(cm.async_queue); return 0; } -- cgit