This commit is contained in:
Gerolf Ziegenhain 2016-10-04 16:41:45 +02:00
parent 8142e10343
commit 6142bab18b
2 changed files with 14 additions and 10 deletions

View File

@ -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;

View File

@ -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();