1 /* libSoX DVMS format module (implementation in cvsd.c)
3 * Copyright (C) 1996-2007 Thomas Sailer and SoX Contributors
4 * Thomas Sailer (sailer@ife.ee.ethz.ch) (HB9JNX/AE4WA)
5 * Swiss Federal Institute of Technology, Electronics Lab
7 * This library is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation; either version 2.1 of the License, or (at
10 * your option) any later version.
12 * This library is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
15 * General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this library; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 #define CVSD_ENC_FILTERLEN 16 /* PCM sampling rate */
25 #define CVSD_DEC_FILTERLEN 48 /* CVSD sampling rate */
39 /* mirror circular buffer */
40 float output_filter
[CVSD_DEC_FILTERLEN
*2];
41 unsigned offset
; /* into output_filter; always in first half */
45 /* mirror circular buffer */
46 float input_filter
[CVSD_ENC_FILTERLEN
*2];
47 unsigned offset
; /* into input_filter; always in first half */
55 unsigned bytes_written
;
59 int lsx_cvsdstartread(sox_format_t
* ft
);
60 int lsx_cvsdstartwrite(sox_format_t
* ft
);
61 size_t lsx_cvsdread(sox_format_t
* ft
, sox_sample_t
*buf
, size_t nsamp
);
62 size_t lsx_cvsdwrite(sox_format_t
* ft
, const sox_sample_t
*buf
, size_t nsamp
);
63 int lsx_cvsdstopread(sox_format_t
* ft
);
64 int lsx_cvsdstopwrite(sox_format_t
* ft
);
66 int lsx_dvmsstartread(sox_format_t
* ft
);
67 int lsx_dvmsstartwrite(sox_format_t
* ft
);
68 int lsx_dvmsstopwrite(sox_format_t
* ft
);