diff options
author | Davide Gerhard <rainbow@irh.it> | 2019-10-24 08:31:46 +0200 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2019-11-01 15:40:05 +0100 |
commit | 9e24c1e34083f953b8fda76ca0575d378a5e10d4 (patch) | |
tree | 4e5085b6493d3bc0cb3795f7c99f77775f5c6c0f | |
parent | a1480bd6c980a3b9a10e4ce2a5ff1ba4e1098cc7 (diff) |
codec2: development (master) branch support
add support for the development branch (master) of codec2 still
maintaining compatibility with version 0.8.1.
NOTE:
from 0.9.1 codec2 works fine without `extern "C"`.
from 0.8.1 to 0.9.1 the build fail.
-rw-r--r-- | gr-vocoder/include/gnuradio/vocoder/freedv_api.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gr-vocoder/include/gnuradio/vocoder/freedv_api.h b/gr-vocoder/include/gnuradio/vocoder/freedv_api.h index b00cbbd425..04c768bcb7 100644 --- a/gr-vocoder/include/gnuradio/vocoder/freedv_api.h +++ b/gr-vocoder/include/gnuradio/vocoder/freedv_api.h @@ -25,11 +25,18 @@ #include <gnuradio/vocoder/api.h> +// version >=0.9.1 contains fixes that doesn't require "extern C" +// between 0.8.1 and 0.9.1 the build fail +#include <codec2/version.h> +#if CODEC2_VERSION_MAJOR == 0 && CODEC2_VERSION_MINOR < 9 extern "C" { +#endif #include <codec2/codec2.h> #include <codec2/freedv_api.h> #include <codec2/modem_stats.h> +#if CODEC2_VERSION_MAJOR == 0 && CODEC2_VERSION_MINOR < 9 } +#endif namespace gr { namespace vocoder { |