Remove audio args.
This commit is contained in:
parent
7146ba5792
commit
b681e0d9f1
@ -108,7 +108,6 @@ int guac_client_init(guac_client* client, int argc, char** argv) {
|
|||||||
vnc_guac_client_data* guac_client_data;
|
vnc_guac_client_data* guac_client_data;
|
||||||
|
|
||||||
#ifdef ENABLE_PULSE
|
#ifdef ENABLE_PULSE
|
||||||
audio_args* args;
|
|
||||||
pthread_t pa_read_thread, pa_send_thread;
|
pthread_t pa_read_thread, pa_send_thread;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -181,15 +180,9 @@ int guac_client_init(guac_client* client, int argc, char** argv) {
|
|||||||
"Audio will be encoded as %s",
|
"Audio will be encoded as %s",
|
||||||
guac_client_data->audio->encoder->mimetype);
|
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 */
|
/* Create a thread to read audio data */
|
||||||
if (pthread_create(&pa_read_thread, NULL, guac_pa_read_audio,
|
if (pthread_create(&pa_read_thread, NULL, guac_pa_read_audio,
|
||||||
(void*) args)) {
|
(void*) guac_client_data)) {
|
||||||
guac_protocol_send_error(client->socket,
|
guac_protocol_send_error(client->socket,
|
||||||
"Error initializing PulseAudio thread");
|
"Error initializing PulseAudio thread");
|
||||||
guac_socket_flush(client->socket);
|
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 */
|
/* Create a thread to send audio data */
|
||||||
if (pthread_create(&pa_send_thread, NULL, guac_pa_send_audio,
|
if (pthread_create(&pa_send_thread, NULL, guac_pa_send_audio,
|
||||||
(void*) args)) {
|
(void*) guac_client_data)) {
|
||||||
guac_protocol_send_error(client->socket,
|
guac_protocol_send_error(client->socket,
|
||||||
"Error initializing PulseAudio thread");
|
"Error initializing PulseAudio thread");
|
||||||
guac_socket_flush(client->socket);
|
guac_socket_flush(client->socket);
|
||||||
|
@ -73,14 +73,6 @@
|
|||||||
*/
|
*/
|
||||||
#define SEND_INTERVAL 500
|
#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
|
* Allocates a new audio buffer that can be shared between the
|
||||||
* read and send threads
|
* read and send threads
|
||||||
|
Loading…
Reference in New Issue
Block a user