diff options
-rwxr-xr-x | fxotune.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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. |