wip
This commit is contained in:
parent
8142e10343
commit
6142bab18b
10
src/beep.c
10
src/beep.c
@ -199,16 +199,6 @@ int beep_test(void)
|
||||
/*
|
||||
* This extra small demo sends sinusoidal samples to your speakers.
|
||||
*/
|
||||
#include <stdint.h>
|
||||
#include <alsa/asoundlib.h>
|
||||
#include <math.h>
|
||||
|
||||
static char *device = "hw:0,0"; /* playback device */
|
||||
snd_output_t *output = NULL;
|
||||
|
||||
#define FRAMES 16384L
|
||||
|
||||
int16_t buffer[FRAMES*2]; /* 16bit stereo sound samples */
|
||||
int beep_test(void)
|
||||
{
|
||||
int err;
|
||||
|
14
src/beep.h
14
src/beep.h
@ -45,6 +45,20 @@ void msleep(int d);
|
||||
int beep_test(void);
|
||||
#endif
|
||||
|
||||
#ifdef ALSA
|
||||
#include <stdint.h>
|
||||
#include <alsa/asoundlib.h>
|
||||
#include <math.h>
|
||||
|
||||
static char *device = "hw:0,0"; /* playback device */
|
||||
snd_output_t *output = NULL;
|
||||
|
||||
#define FRAMES 16384L
|
||||
|
||||
int16_t buffer[FRAMES*2]; /* 16bit stereo sound samples */
|
||||
|
||||
#endif
|
||||
|
||||
// compatibility to old interface
|
||||
int beep(double freq_hz, double duration_sec);
|
||||
int beep_init();
|
||||
|
Loading…
Reference in New Issue
Block a user