4
Fork 0
This commit is contained in:
Artem Prilutskiy 2017-05-26 14:05:21 +03:00
parent 322f562fe8
commit aecdea3d54

View file

@ -165,11 +165,12 @@ int main(int argc, char* argv[])
int handle; int handle;
struct itimerspec interval; 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_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); handle = timerfd_create(CLOCK_MONOTONIC, 0);
timerfd_settime(handle, 0, &interval, NULL); timerfd_settime(handle, 0, &interval, NULL);
@ -204,10 +205,13 @@ int main(int argc, char* argv[])
if (pointer < limit) if (pointer < limit)
{ {
printf("Input data stream stopped\n"); printf("Input data stream ended\n");
break; break;
} }
printf("[> %d <]\r", count);
fflush(stdout);
// Convert to linear format // Convert to linear format
buffer[0 * DSD_AMBE_CHUNK_SIZE + 7] <<= 7; buffer[0 * DSD_AMBE_CHUNK_SIZE + 7] <<= 7;