Browse Source

simple_client_timestamps

pull/450/head
Christoph Kuhr 7 years ago
parent
commit
c97f97e1e9
2 changed files with 15 additions and 6 deletions
  1. +7
    -6
      example-clients/simple_client.c
  2. +8
    -0
      example-clients/simple_client1.c

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

@@ -124,12 +124,6 @@ process (jack_nframes_t nframes, void *arg)
// fprintf(filepointer, " Clockrealtime Error\n");fflush(filepointer);
}

memset(msg_send, 0, Q_MSG_SIZE);
sprintf (msg_send, "%llx", (sys_time.tv_sec*1000000000ULL + sys_time.tv_nsec));

if (mq_send(tsq, msg_send, Q_MSG_SIZE, 0) < 0) {
// fprintf(filepointer, "send error %d %s %s\n", errno, strerror(errno), msg_send);fflush(filepointer);
}

out1 = (jack_default_audio_sample_t*)jack_port_get_buffer (output_port1, nframes);
out2 = (jack_default_audio_sample_t*)jack_port_get_buffer (output_port2, nframes);
@@ -144,6 +138,13 @@ process (jack_nframes_t nframes, void *arg)
if( data->right_phase >= TABLE_SIZE ) data->right_phase -= TABLE_SIZE;
}

memset(msg_send, 0, Q_MSG_SIZE);
sprintf (msg_send, "%llx", (sys_time.tv_sec*1000000000ULL + sys_time.tv_nsec));

if (mq_send(tsq, msg_send, Q_MSG_SIZE, 0) < 0) {
// fprintf(filepointer, "send error %d %s %s\n", errno, strerror(errno), msg_send);fflush(filepointer);
}

return 0;
}



+ 8
- 0
example-clients/simple_client1.c View File

@@ -132,6 +132,14 @@ process (jack_nframes_t nframes, void *arg)
if( data->right_phase >= TABLE_SIZE ) data->right_phase -= TABLE_SIZE;
}


memset(msg_send, 0, Q_MSG_SIZE);
sprintf (msg_send, "%llx", (sys_time.tv_sec*1000000000ULL + sys_time.tv_nsec));

if (mq_send(tsq, msg_send, Q_MSG_SIZE, 0) < 0) {
// fprintf(filepointer, "send error %d %s %s\n", errno, strerror(errno), msg_send);fflush(filepointer);
}

return 0;
}



Loading…
Cancel
Save