From 32025915d564d999c33e73a4b6084d9df0dbd42a Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Sat, 10 Nov 2018 15:16:20 +0100 Subject: Make run faster on ARM CPUs using fast math approximation Use --fast-math to use sine/cosine tables and approximate atan2. --- src/libfm/fm.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/libfm/fm.h') diff --git a/src/libfm/fm.h b/src/libfm/fm.h index 68f0bcd..b87a662 100644 --- a/src/libfm/fm.h +++ b/src/libfm/fm.h @@ -1,5 +1,8 @@ #include "../libfilter/iir_filter.h" +int fm_init(int fast_math); +void fm_exit(void); + enum fm_mod_state { MOD_STATE_OFF, /* transmitter off, no IQ vector */ MOD_STATE_ON, /* transmitter on, FM modulated IQ vector */ @@ -12,7 +15,6 @@ typedef struct fm_mod { double offset; /* offset to calculated center frequency */ double amplitude; /* how much amplitude to add to the buff */ double phase; /* current phase of FM (used to shift and modulate ) */ - double *sin_tab; /* sine/cosine table for modulation */ enum fm_mod_state state;/* state of transmit power */ double *ramp_tab; /* half cosine ramp up */ int ramp; /* current ramp position */ @@ -29,7 +31,6 @@ typedef struct fm_demod { double rot; /* rotation step per sample to shift rx frequency (used to shift) */ double last_phase; /* last phase of FM (used to demodulate) */ iir_filter_t lp[2]; /* filters received IQ signal */ - double *sin_tab; /* sine/cosine table rotation */ } fm_demod_t; int fm_demod_init(fm_demod_t *demod, double samplerate, double offset, double bandwidth); -- cgit v1.2.3