Move samples of int16_t format to sample_t, that is of type double

This prepares the correction of all levels
This commit is contained in:
Andreas Eversberg
2017-01-27 16:57:34 +01:00
parent 538a959128
commit 7ea3bc188d
74 changed files with 471 additions and 447 deletions

View File

@@ -20,6 +20,7 @@
#include <stdint.h>
#include <string.h>
#include <math.h>
#include "sample.h"
#include "dtmf.h"
#define PI M_PI
@@ -27,7 +28,7 @@
#define TX_PEAK_DTMF 7000 /* single dtmf tone peak (note this is half to total peak) */
#define DTMF_DURATION 0.100 /* duration in seconds */
int dsp_sine_dtmf[256];
static double dsp_sine_dtmf[256];
void dtmf_init(dtmf_t *dtmf, int samplerate)
{
@@ -75,7 +76,7 @@ void dtmf_set_tone(dtmf_t *dtmf, char tone)
}
/* Generate audio stream from DTMF tone. Keep phase for next call of function. */
void dtmf_tone(dtmf_t *dtmf, int16_t *samples, int length)
void dtmf_tone(dtmf_t *dtmf, sample_t *samples, int length)
{
double *phaseshift, *phase;
int i, pos, max;