Browse Source

simple_client_timestamps

pull/450/head
Christoph Kuhr 7 years ago
parent
commit
a90c788ea4
1 changed files with 7 additions and 4 deletions
  1. +7
    -4
      example-clients/simple_client.c

+ 7
- 4
example-clients/simple_client.c View File

@@ -26,6 +26,11 @@
#include <sys/wait.h> #include <sys/wait.h>
#include <sys/errno.h> #include <sys/errno.h>


#define Q_NAME "/tsq"
#define Q_MSG_SIZE 10
#define TABLE_SIZE (200)


jack_port_t *output_port1, *output_port2; jack_port_t *output_port1, *output_port2;
jack_client_t *client; jack_client_t *client;
pthread_t writerThread; pthread_t writerThread;
@@ -37,9 +42,7 @@ char msg_send[Q_MSG_SIZE];
#define M_PI (3.14159265) #define M_PI (3.14159265)
#endif #endif


#define Q_NAME "/tsq"
#define Q_MSG_SIZE 10
#define TABLE_SIZE (200)

typedef struct typedef struct
{ {
float sine[TABLE_SIZE]; float sine[TABLE_SIZE];
@@ -89,7 +92,7 @@ void *worker_thread_listener_fileWriter()
fprintf(filepointer, "%s\n",msg_recv);fflush(filepointer); fprintf(filepointer, "%s\n",msg_recv);fflush(filepointer);
} else { } else {
if(errno != EAGAIN){ if(errno != EAGAIN){
fprintf(filepointer, "[Q %d] recv error %d %s %s\n", q, errno, strerror(errno), msg_recv);fflush(filepointer);
fprintf(filepointer, "[Q %d] recv error %d %s %s\n", tsq, errno, strerror(errno), msg_recv);fflush(filepointer);
} }
} }
nanosleep(&tim , NULL); nanosleep(&tim , NULL);


Loading…
Cancel
Save