From aecdea3d544406ff88f800ac7bcd5c31f3d957e9 Mon Sep 17 00:00:00 2001 From: Artem Prilutskiy Date: Fri, 26 May 2017 14:05:21 +0300 Subject: [PATCH] .. --- DigestPlay.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/DigestPlay.c b/DigestPlay.c index f58151e..da31b54 100644 --- a/DigestPlay.c +++ b/DigestPlay.c @@ -165,11 +165,12 @@ int main(int argc, char* argv[]) int handle; struct itimerspec interval; - memset(&interval, 0, sizeof(struct itimerspec)); - - interval.it_interval.tv_sec = 0; + interval.it_interval.tv_sec = 0; interval.it_interval.tv_nsec = TDMA_FRAME_DURATION * 1000000; + interval.it_value.tv_sec = interval.it_interval.tv_sec; + interval.it_value.tv_nsec = interval.it_interval.tv_nsec; + handle = timerfd_create(CLOCK_MONOTONIC, 0); timerfd_settime(handle, 0, &interval, NULL); @@ -204,10 +205,13 @@ int main(int argc, char* argv[]) if (pointer < limit) { - printf("Input data stream stopped\n"); + printf("Input data stream ended\n"); break; } + printf("[> %d <]\r", count); + fflush(stdout); + // Convert to linear format buffer[0 * DSD_AMBE_CHUNK_SIZE + 7] <<= 7;