3 * Copyright 2007,2009 Free Software Foundation, Inc.
5 * This file is part of GNU Radio
7 * GNU Radio is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3, or (at your option)
12 * GNU Radio is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with GNU Radio; see the file COPYING. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street,
20 * Boston, MA 02110-1301, USA.
26 #include "cvsd_encode_sb.h"
27 #include "cvsd_decode_bs.h"
30 GR_SWIG_BLOCK_MAGIC(cvsd,encode_sb);
32 cvsd_encode_sb_sptr cvsd_make_encode_sb (short min_step=10,
34 double step_decay=0.9990234375,
35 double accum_decay= 0.96875,
38 short pos_accum_max=32767,
39 short neg_accum_max=-32767);
41 class cvsd_encode_sb : public gr_sync_decimator
44 cvsd_encode_sb (short min_step, short max_step, double step_decay,
45 double accum_decay, int K, int J,
46 short pos_accum_max, short neg_accum_max);
50 short min_step() { return d_min_step; }
51 short max_step() { return d_max_step; }
52 double step_decay() { return d_step_decay; }
53 double accum_decay() { return d_accum_decay; }
54 int K() { return d_K; }
55 int J() { return d_J; }
56 short pos_accum_max() { return d_pos_accum_max; }
57 short neg_accum_max() { return d_neg_accum_max; }
60 // ----------------------------------------------------------------
62 GR_SWIG_BLOCK_MAGIC(cvsd,decode_bs);
64 cvsd_decode_bs_sptr cvsd_make_decode_bs (short min_step=10,
66 double step_decay=0.9990234375,
67 double accum_decay= 0.96875,
70 short pos_accum_max=32767,
71 short neg_accum_max=-32767);
73 class cvsd_decode_bs : public gr_sync_interpolator
76 cvsd_decode_bs (short min_step, short max_step, double step_decay,
77 double accum_decay, int K, int J,
78 short pos_accum_max, short neg_accum_max);