summaryrefslogtreecommitdiff
path: root/fxotune.c
diff options
context:
space:
mode:
Diffstat (limited to 'fxotune.c')
-rwxr-xr-xfxotune.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fxotune.c b/fxotune.c
index 04f89ed..07fb834 100755
--- a/fxotune.c
+++ b/fxotune.c
@@ -34,7 +34,7 @@
#define BUFFER_LENGTH 8000 /* 4000 sample buffers */
#define SKIP_BYTES 1600
-#define PI 3.14
+static const float loudness = 16384.0;
static char *zappath = "/dev/zap";
static char *configfile = "/etc/fxotune.conf";
@@ -56,7 +56,7 @@ static int debug = 0;
* Returns a 16bit slinear sample. */
static short inline gentone(int hz, int index)
{
- return sinf(index * 2 * PI * hz/8000);
+ return loudness * sin((index * 2.0 * M_PI * hz)/8000);
}
/* Returns the power of the buffer of samples in 16bit slinear format.