This commit is contained in:
Gerolf Ziegenhain 2016-10-03 17:58:42 +02:00
parent 436d30d5e1
commit ab83ca4738
2 changed files with 2 additions and 9 deletions

View File

@ -6,8 +6,6 @@
#include "beep.h" #include "beep.h"
// OSX Code
#ifdef __MACH__
// http://stackoverflow.com/questions/7678470/generating-sound-of-a-particular-frequency-using-gcc-in-ubuntu // http://stackoverflow.com/questions/7678470/generating-sound-of-a-particular-frequency-using-gcc-in-ubuntu
static PaStream *stream; static PaStream *stream;
@ -182,12 +180,11 @@ int beep_test(void)
return 0; return 0;
} }
#endif
// Raspi does not work with portaudio?! // Raspi does not work with portaudio?!
#ifdef __ARM__ #ifdef __ARM1__
/* /*
* This extra small demo sends sinusoidal samples to your speakers. * This extra small demo sends sinusoidal samples to your speakers.
*/ */
@ -201,7 +198,7 @@ snd_output_t *output = NULL;
#define FRAMES 16384L #define FRAMES 16384L
int16_t buffer[FRAMES*2]; /* 16bit stereo sound samples */ int16_t buffer[FRAMES*2]; /* 16bit stereo sound samples */
int main(void) int beep_test(void)
{ {
int err; int err;
double p1,p2,f1,f2; double p1,p2,f1,f2;

View File

@ -10,8 +10,6 @@
#define M_PI (3.14159265) #define M_PI (3.14159265)
#endif #endif
// OSX Code
#ifdef __MACH__
typedef struct typedef struct
{ {
uint32_t total_count; uint32_t total_count;
@ -34,8 +32,6 @@ int buzzer_start(void);
int buzzer_stop(); int buzzer_stop();
void msleep(int d); void msleep(int d);
int beep_test(void); int beep_test(void);
#endif
// compatibility to old interface // compatibility to old interface
int beep(double freq_hz, double duration_sec); int beep(double freq_hz, double duration_sec);