Beispiel #1
0
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "GeneratorFMS.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#endif


#define PHINC(x)   ((float)(x)*0x10000/SAMPLE_RATE)

static const unsigned int fms_freq[2] = {
	PHINC(1800), PHINC(1200)
};


//////////////////////////////////////////////////////////////////////
// Konstruktion/Destruktion
//////////////////////////////////////////////////////////////////////

CGeneratorFMS::CGeneratorFMS()
{
	m_iAmpl = 16384;
	duration = MS((float)1000/1200);
	pause = MS(0);
	ch_idx=0 ;
	memset(pkt,0,256) ;
	memset(data,0,512) ;
Beispiel #2
0
 *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

/* ---------------------------------------------------------------------- */

#include "multimon_gen.h"
#include <string.h>
#include <ctype.h>
#include <stdio.h>

/* ---------------------------------------------------------------------- */

#define PHINC(x)   ((float)(x)*0x10000/SAMPLE_RATE)

static const unsigned int zvei_freq[16] = {
	PHINC(2400), PHINC(1060), PHINC(1160), PHINC(1270), 
	PHINC(1400), PHINC(1530), PHINC(1670), PHINC(1830), 
	PHINC(2000), PHINC(2200), PHINC(2800), PHINC(810), 
	PHINC(970), PHINC(886), PHINC(2600), PHINC(0)
};

static const unsigned int zveis_freq[16] = {
	PHINC(2400), PHINC(1060), PHINC(1160), PHINC(1270), 
	PHINC(1400), PHINC(1530), PHINC(1670), PHINC(1830), 
	PHINC(2000), PHINC(2200), PHINC(886), PHINC(810), 
	PHINC(740), PHINC(680), PHINC(970), PHINC(0)
};

void gen_init_zvei(struct gen_params *p, struct gen_state *s)
{
	memset(s, 0, sizeof(struct gen_state));
Beispiel #3
0
 *      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., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#define SAMPLE_RATE 22050
#define PHINC(x) ((x)*0x10000/SAMPLE_RATE)

#include "multimon.h"

static const unsigned int ccir_freq[16] = {
    PHINC(1981), PHINC(1124), PHINC(1197), PHINC(1275),
    PHINC(1358), PHINC(1446), PHINC(1540), PHINC(1640),
    PHINC(1747), PHINC(1860), PHINC(2400), PHINC(930),
    PHINC(2247), PHINC(991), PHINC(2110), PHINC(1055)
};

/* ---------------------------------------------------------------------- */

static void ccir_init(struct demod_state *s)
{
    selcall_init(s);
}

static void ccir_deinit(struct demod_state *s)
{
    selcall_deinit(s);
Beispiel #4
0
#include "m.h"
#include "m_dsp.h"

/*
 *      1209 1336 1477 1633
 *  697   1    2    3    A
 *  770   4    5    6    B
 *  852   7    8    9    C
 *  941   *    0    #    D
 */

#define PHINC(f) ((f)*COSTAB_SIZE/SAMPLE_RATE)

static const int16_t dtmf_phinc_low[] =
    { PHINC(697), PHINC(770), PHINC(852), PHINC(941) };
static const int16_t dtmf_phinc_high[] =
    { PHINC(1209), PHINC(1336), PHINC(1477), PHINC(1633) };
static const char dtmf_trans[] = "123A456B789C*0#D";

/* dtmf stuff */
struct dtmfgen_state {
	const char *p;
	unsigned int duration;
	unsigned int pause_duration;
	unsigned int count;
	unsigned int phinc_low, phinc_high;
	unsigned int phase_low, phase_high;
};

void dtmfgen_init(struct dtmfgen_state *s, const char *dial_string)