GNU Radio 3.7.3 C++ API
codec2_encode_sp.h
Go to the documentation of this file.
1
/* -*- c++ -*- */
2
/*
3
* Copyright 2005,2013,2014 Free Software Foundation, Inc.
4
*
5
* This file is part of GNU Radio
6
*
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)
10
* any later version.
11
*
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.
16
*
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.
21
*/
22
23
#ifndef INCLUDED_VOCODER_CODEC2_ENCODE_SP_H
24
#define INCLUDED_VOCODER_CODEC2_ENCODE_SP_H
25
26
#include <
gnuradio/vocoder/api.h
>
27
#include <
gnuradio/sync_decimator.h
>
28
29
namespace
gr {
30
namespace
vocoder {
31
32
/*!
33
* \brief CODEC2 Vocoder Encoder
34
* \ingroup audio_blk
35
*
36
* Input: Speech (audio) signal as 16-bit shorts, sampling rate 8 kHz.
37
*
38
* Output: Vector of 50 unpacked bits, forming one Codec2 frame, per 160 input samples.
39
*
40
* Note that the Codec2 library produces 7 bytes with a total of 50 bits
41
* per frame. The bits are MSB-first on these 7 bytes, so the first item
42
* of the output vector is the MSB of the first byte of the frame.
43
* If this block is combined with the gr::vocoder::codec2_decode_ps block,
44
* this will work out of the box.
45
*
46
*/
47
class
VOCODER_API
codec2_encode_sp
:
virtual
public
sync_decimator
48
{
49
public
:
50
// gr::vocoder::codec2_encode_sp::sptr
51
typedef
boost::shared_ptr<codec2_encode_sp>
sptr
;
52
53
/*!
54
* \brief Make Codec2 encoder block.
55
*/
56
static
sptr
make();
57
};
58
59
}
/* namespace vocoder */
60
}
/* namespace gr */
61
62
#endif
/* INCLUDED_VOCODER_CODEC2_ENCODE_SP_H */
gnuradio
gr-vocoder
include
gnuradio
vocoder
codec2_encode_sp.h
Generated by
1.8.3.1