From b681e0d9f10ed81bef28512196c7473aad0ff32a Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Thu, 8 Aug 2013 19:05:42 -0700 Subject: [PATCH] Remove audio args. --- src/protocols/vnc/client.c | 11 ++--------- src/protocols/vnc/pa_handlers.h | 8 -------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/src/protocols/vnc/client.c b/src/protocols/vnc/client.c index 3d8a31a2..5e7fcb89 100644 --- a/src/protocols/vnc/client.c +++ b/src/protocols/vnc/client.c @@ -108,7 +108,6 @@ int guac_client_init(guac_client* client, int argc, char** argv) { vnc_guac_client_data* guac_client_data; #ifdef ENABLE_PULSE - audio_args* args; pthread_t pa_read_thread, pa_send_thread; #endif @@ -181,15 +180,9 @@ int guac_client_init(guac_client* client, int argc, char** argv) { "Audio will be encoded as %s", guac_client_data->audio->encoder->mimetype); - guac_client_data->audio_buffer = guac_pa_buffer_alloc(); - - args = malloc(sizeof(audio_args)); - args->audio = guac_client_data->audio; - args->audio_buffer = guac_client_data->audio_buffer; - /* Create a thread to read audio data */ if (pthread_create(&pa_read_thread, NULL, guac_pa_read_audio, - (void*) args)) { + (void*) guac_client_data)) { guac_protocol_send_error(client->socket, "Error initializing PulseAudio thread"); guac_socket_flush(client->socket); @@ -200,7 +193,7 @@ int guac_client_init(guac_client* client, int argc, char** argv) { /* Create a thread to send audio data */ if (pthread_create(&pa_send_thread, NULL, guac_pa_send_audio, - (void*) args)) { + (void*) guac_client_data)) { guac_protocol_send_error(client->socket, "Error initializing PulseAudio thread"); guac_socket_flush(client->socket); diff --git a/src/protocols/vnc/pa_handlers.h b/src/protocols/vnc/pa_handlers.h index 8e2c87dc..f92727d8 100644 --- a/src/protocols/vnc/pa_handlers.h +++ b/src/protocols/vnc/pa_handlers.h @@ -73,14 +73,6 @@ */ #define SEND_INTERVAL 500 -/** - * Arguments for the read and send threads - */ -typedef struct audio_args { - guac_audio_stream* audio; - buffer* audio_buffer; -} audio_args; - /** * Allocates a new audio buffer that can be shared between the * read and send threads