From ab83ca4738c19291e3b894e380f089a340a46c45 Mon Sep 17 00:00:00 2001 From: Gerolf Ziegenhain Date: Mon, 3 Oct 2016 17:58:42 +0200 Subject: [PATCH] . --- src/beep.c | 7 ++----- src/beep.h | 4 ---- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/beep.c b/src/beep.c index 9ded1d3..8a4ca55 100644 --- a/src/beep.c +++ b/src/beep.c @@ -6,8 +6,6 @@ #include "beep.h" -// OSX Code -#ifdef __MACH__ // http://stackoverflow.com/questions/7678470/generating-sound-of-a-particular-frequency-using-gcc-in-ubuntu static PaStream *stream; @@ -182,12 +180,11 @@ int beep_test(void) return 0; } -#endif // Raspi does not work with portaudio?! -#ifdef __ARM__ +#ifdef __ARM1__ /* * This extra small demo sends sinusoidal samples to your speakers. */ @@ -201,7 +198,7 @@ snd_output_t *output = NULL; #define FRAMES 16384L int16_t buffer[FRAMES*2]; /* 16bit stereo sound samples */ -int main(void) +int beep_test(void) { int err; double p1,p2,f1,f2; diff --git a/src/beep.h b/src/beep.h index 3ba212f..9416409 100644 --- a/src/beep.h +++ b/src/beep.h @@ -10,8 +10,6 @@ #define M_PI (3.14159265) #endif -// OSX Code -#ifdef __MACH__ typedef struct { uint32_t total_count; @@ -34,8 +32,6 @@ 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);