From 8da5cc22d6c13659d65b501246e2e82ba12f5a43 Mon Sep 17 00:00:00 2001 From: Gerolf Ziegenhain Date: Tue, 4 Oct 2016 18:02:49 +0200 Subject: [PATCH] wip --- src/beep.c | 3 +-- src/util.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/beep.c b/src/beep.c index 33c6d7f..f24bc91 100644 --- a/src/beep.c +++ b/src/beep.c @@ -4,7 +4,6 @@ #include // for usleep() #include "beep.h" -#include "util.h" #ifdef PORTAUDIO // http://stackoverflow.com/questions/7678470/generating-sound-of-a-particular-frequency-using-gcc-in-ubuntu @@ -184,7 +183,7 @@ int beep(double freq_hz, double duration_sec) { if (freq_hz <= 0.0) { - msleep(duration_sec*1000.); + usleep(duration_sec*1000.*1000); return 0; } double p1,p2,f1,f2; diff --git a/src/util.h b/src/util.h index 558511d..da857f3 100644 --- a/src/util.h +++ b/src/util.h @@ -2,4 +2,4 @@ void current_utc_time(struct timespec *ts); long fastclock(void); int kbhit (void); void msleep(int d); -extern void *get_in_addr(struct sockaddr *sa); +void *get_in_addr(struct sockaddr *sa);