wip
This commit is contained in:
parent
f3b0df241d
commit
2a72f535a7
@ -2,7 +2,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <unistd.h> // for usleep()
|
#include <unistd.h> // for usleep()
|
||||||
#include "portaudio.h"
|
|
||||||
|
|
||||||
#include "beep.h"
|
#include "beep.h"
|
||||||
|
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
#ifdef __MACH__
|
||||||
|
#define PORTAUDIO
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PORTAUDIO
|
||||||
#include <portaudio.h>
|
#include <portaudio.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define NUM_SECONDS (5)
|
#define NUM_SECONDS (5)
|
||||||
#define SAMPLE_RATE (48000)
|
#define SAMPLE_RATE (48000)
|
||||||
@ -10,6 +17,7 @@
|
|||||||
#define M_PI (3.14159265)
|
#define M_PI (3.14159265)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef PORTAUDIO
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
uint32_t total_count;
|
uint32_t total_count;
|
||||||
@ -32,6 +40,7 @@ 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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user