wip
This commit is contained in:
parent
ff773f1f4e
commit
8da5cc22d6
@ -4,7 +4,6 @@
|
|||||||
#include <unistd.h> // for usleep()
|
#include <unistd.h> // for usleep()
|
||||||
|
|
||||||
#include "beep.h"
|
#include "beep.h"
|
||||||
#include "util.h"
|
|
||||||
|
|
||||||
#ifdef PORTAUDIO
|
#ifdef PORTAUDIO
|
||||||
// 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
|
||||||
@ -184,7 +183,7 @@ int beep(double freq_hz, double duration_sec)
|
|||||||
{
|
{
|
||||||
if (freq_hz <= 0.0)
|
if (freq_hz <= 0.0)
|
||||||
{
|
{
|
||||||
msleep(duration_sec*1000.);
|
usleep(duration_sec*1000.*1000);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
double p1,p2,f1,f2;
|
double p1,p2,f1,f2;
|
||||||
|
@ -2,4 +2,4 @@ void current_utc_time(struct timespec *ts);
|
|||||||
long fastclock(void);
|
long fastclock(void);
|
||||||
int kbhit (void);
|
int kbhit (void);
|
||||||
void msleep(int d);
|
void msleep(int d);
|
||||||
extern void *get_in_addr(struct sockaddr *sa);
|
void *get_in_addr(struct sockaddr *sa);
|
||||||
|
Loading…
Reference in New Issue
Block a user