summaryrefslogtreecommitdiff
path: root/gr-vocoder/python/vocoder/bindings/codec2_python.cc
blob: bdcb1409b4310e907bca8296397ee818fc7d7d24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
 * Copyright 2020 Free Software Foundation, Inc.
 *
 * This file is part of GNU Radio
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 *
 */

/* This file is automatically generated using bindtool */

#include <pybind11/complex.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>

namespace py = pybind11;

#include <gnuradio/vocoder/codec2.h>
// pydoc.h is automatically generated in the build directory
#include <codec2_pydoc.h>

void bind_codec2(py::module& m)
{

    using codec2 = ::gr::vocoder::codec2;

    py::class_<codec2, std::shared_ptr<codec2>> codec2_class(m, "codec2", D(codec2));

    py::enum_<gr::vocoder::codec2::bit_rate>(codec2_class, "bit_rate")
        .value("MODE_3200", gr::vocoder::codec2::MODE_3200)
        .value("MODE_2400", gr::vocoder::codec2::MODE_2400)
        .value("MODE_1600", gr::vocoder::codec2::MODE_1600)
        .value("MODE_1400", gr::vocoder::codec2::MODE_1400)
        .value("MODE_1300", gr::vocoder::codec2::MODE_1300)
        .value("MODE_1200", gr::vocoder::codec2::MODE_1200)
#ifdef CODEC2_MODE_700
        .value("MODE_700", gr::vocoder::codec2::MODE_700)
#endif
#ifdef CODEC2_MODE_700B
        .value("MODE_700B", gr::vocoder::codec2::MODE_700B)
#endif
#ifdef CODEC2_MODE_700C
        .value("MODE_700C", gr::vocoder::codec2::MODE_700C)
#endif
#ifdef CODEC2_MODE_WB
        .value("MODE_WB", gr::vocoder::codec2::MODE_WB)
#endif
        .export_values();

    py::implicitly_convertible<int, gr::vocoder::codec2::bit_rate>();
}