git stults online alsa-signals / master sigproc.h
master

Tree @master (Download .tar.gz)

sigproc.h @masterraw · history · blame

#ifndef SIGPROC_H
#define SIGPROC_H

#ifdef __cplusplus
extern "C" {
#endif

#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <sys/types.h>
#include <complex.h>
#include <gsl/gsl_fft_complex.h>
#include <gsl/gsl_errno.h>

typedef struct filter_t filter_t;

filter_t *filter_create  (double rate, double beta, size_t n);

void      filter_destroy (filter_t *filter);

int       filter_execute (filter_t *filter, double *cdata, size_t n);

int       fft_forward (double *data, size_t n, size_t stride);

int       fft_inverse (double *data, size_t n, size_t stride);

double   *make_pulse (double *symbols, size_t n, size_t size, size_t *ret);

double   *encode_bpsk    (unsigned char *data, size_t n, size_t *ret);

unsigned char *decode_bpsk (double *data, size_t n, size_t *ret);

double complex *interpolate (const double complex *array, size_t n,
			     size_t num, size_t *ret);
  
double complex *decimate    (const double complex *array, size_t n,
			     size_t num, size_t *ret);

double complex *convolve    (const double complex *d1, const double complex *d2,
			     size_t n, size_t *ret);

double complex *correlate   (const double complex *d1, const double complex *d2,
			     size_t n, size_t *ret);

#ifdef __cplusplus
}
#endif

#endif /* SIGPROC_H */