From 2a72f535a7273c1522fff54455b35d985302bb2e Mon Sep 17 00:00:00 2001 From: Gerolf Ziegenhain Date: Tue, 4 Oct 2016 16:37:06 +0200 Subject: [PATCH] wip --- src/beep.c | 1 - src/beep.h | 9 +++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/beep.c b/src/beep.c index 7cec3d2..a2345f5 100644 --- a/src/beep.c +++ b/src/beep.c @@ -2,7 +2,6 @@ #include #include #include // for usleep() -#include "portaudio.h" #include "beep.h" diff --git a/src/beep.h b/src/beep.h index 20337f2..97d0dea 100644 --- a/src/beep.h +++ b/src/beep.h @@ -1,6 +1,13 @@ #include #include + +#ifdef __MACH__ +#define PORTAUDIO +#endif + +#ifdef PORTAUDIO #include +#endif #define NUM_SECONDS (5) #define SAMPLE_RATE (48000) @@ -10,6 +17,7 @@ #define M_PI (3.14159265) #endif +#ifdef PORTAUDIO typedef struct { uint32_t total_count; @@ -32,6 +40,7 @@ int buzzer_start(void); int buzzer_stop(); void msleep(int d); int beep_test(void); +#endif // compatibility to old interface int beep(double freq_hz, double duration_sec);