aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/fm_modulation.h
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-08-05 10:41:23 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2017-08-09 17:27:13 +0200
commit534411d660ad2b9567059e371cf30e71d4e4e848 (patch)
tree3c1796e7b79b3760934b592407dab91364822c7a /src/common/fm_modulation.h
parentffd3b848e1c2ca5e8449731062acd84f9d7d664b (diff)
New common FSK implementation, replaces all individual implementations
Diffstat (limited to 'src/common/fm_modulation.h')
-rw-r--r--src/common/fm_modulation.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/common/fm_modulation.h b/src/common/fm_modulation.h
index 2cd571a..83e7db4 100644
--- a/src/common/fm_modulation.h
+++ b/src/common/fm_modulation.h
@@ -1,3 +1,4 @@
+#include "../common/iir_filter.h"
typedef struct fm_mod {
double samplerate; /* sample rate of in and out */
@@ -7,8 +8,9 @@ typedef struct fm_mod {
double *sin_tab; /* sine/cosine table for modulation */
} fm_mod_t;
-void fm_mod_init(fm_mod_t *mod, double samplerate, double offset, double amplitude);
-void fm_modulate(fm_mod_t *mod, sample_t *samples, int num, float *buff);
+int fm_mod_init(fm_mod_t *mod, double samplerate, double offset, double amplitude);
+void fm_mod_exit(fm_mod_t *mod);
+void fm_modulate_complex(fm_mod_t *mod, sample_t *frequency, int num, float *baseband);
typedef struct fm_demod {
double samplerate; /* sample rate of in and out */
@@ -19,6 +21,8 @@ typedef struct fm_demod {
double *sin_tab; /* sine/cosine table rotation */
} fm_demod_t;
-void fm_demod_init(fm_demod_t *demod, double samplerate, double offset, double bandwidth);
-void fm_demodulate(fm_demod_t *demod, sample_t *samples, int num, float *buff);
+int fm_demod_init(fm_demod_t *demod, double samplerate, double offset, double bandwidth);
+void fm_demod_exit(fm_demod_t *demod);
+void fm_demodulate_complex(fm_demod_t *demod, sample_t *frequency, int length, float *baseband, sample_t *I, sample_t *Q);
+void fm_demodulate_real(fm_demod_t *demod, sample_t *frequency, int length, sample_t *baseband, sample_t *I, sample_t *Q);