/* wfmmod.h This file is part of a program that implements a Software-Defined Radio. Copyright (C) 2013, 2016, 2023 Warren Pratt, NR0V This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. The author can be reached by email at warren@wpratt.com */ #ifndef _wfmmod_h #define _wfmmod_h #include "firmin.h" typedef struct _wfmmod { int run; int size; double* in; double* out; double samplerate; double deviation; double f_low; double f_high; // pre-emphasis, single-pole RC; inverse of the receiver's de-emphasis int pre_run; double tau_pre; // 75.0e-6 (Americas) or 50.0e-6 (elsewhere) double pmult; double pnorm; double pre_z; // mod double sphase; double sdelta; // bandpass int bp_run; double bp_fc; int nc; int mp; FIRCORE p; }wfmmod, *WFMMOD; extern WFMMOD create_wfmmod (int run, int size, double* in, double* out, int rate, double dev, double f_low, double f_high, int pre_run, double tau_pre, int bp_run, int nc, int mp); extern void destroy_wfmmod (WFMMOD a); extern void flush_wfmmod (WFMMOD a); extern void xwfmmod (WFMMOD a); extern void setBuffers_wfmmod (WFMMOD a, double* in, double* out); extern void setSamplerate_wfmmod (WFMMOD a, int rate); extern void setSize_wfmmod (WFMMOD a, int size); // TXA Properties extern __declspec (dllexport) void SetTXAWFMDeviation (int channel, double deviation); extern __declspec (dllexport) void SetTXAWFMNC (int channel, int nc); extern __declspec (dllexport) void SetTXAWFMMP (int channel, int mp); extern __declspec (dllexport) void SetTXAWFMAFFreqs (int channel, double low, double high); extern __declspec (dllexport) void SetTXAWFMPreEmphRun (int channel, int run); extern __declspec (dllexport) void SetTXAWFMPreEmphTau (int channel, double tau); #endif