kopia lustrzana https://github.com/OpenRTX/OpenRTX
Added Codec2 dependency as meson subproject
rodzic
5abb5263db
commit
98ab11d7a9
10
meson.build
10
meson.build
|
@ -3,13 +3,13 @@
|
|||
##
|
||||
project('OpenRTX', ['c', 'cpp'],
|
||||
version : '0.3.1',
|
||||
default_options : ['warning_level=3'])
|
||||
default_options : ['warning_level=3', 'b_staticpic=false'])
|
||||
|
||||
##
|
||||
## Optional defines, common to all souces (e.g. to enable debugging)
|
||||
##
|
||||
|
||||
def = { }
|
||||
def = {'VCOM_ENABLED' : ''}
|
||||
|
||||
##
|
||||
## ----------------- Platform-independent source files -------------------------
|
||||
|
@ -65,6 +65,10 @@ minmea_inc = ['lib/minmea/include']
|
|||
# QDEC, a very simple, header only, quadrature decoding library
|
||||
qdec_inc = ['lib/qdec/include']
|
||||
|
||||
# CODEC2, open source speech codec
|
||||
codec2_proj = subproject('codec2')
|
||||
codec2_dep = codec2_proj.get_variable('codec2_dep')
|
||||
|
||||
##
|
||||
## RTOS
|
||||
##
|
||||
|
@ -363,6 +367,7 @@ md3x0_opts = {'sources' : md3x0_src,
|
|||
'cpp_args': md3x0_args,
|
||||
'link_args' : ['-Wl,-T../platform/mcu/STM32F4xx/linker_script.ld',
|
||||
'-Wl,--print-memory-usage'],
|
||||
'dependencies': [codec2_dep],
|
||||
'include_directories': md3x0_inc}
|
||||
|
||||
mduv3x0_opts = {'sources': mduv3x0_src,
|
||||
|
@ -370,6 +375,7 @@ mduv3x0_opts = {'sources': mduv3x0_src,
|
|||
'cpp_args': mduv3x0_args,
|
||||
'link_args' : ['-Wl,-T../platform/mcu/STM32F4xx/linker_script.ld',
|
||||
'-Wl,--print-memory-usage'],
|
||||
'dependencies': [codec2_dep],
|
||||
'include_directories': mduv3x0_inc}
|
||||
|
||||
gd77_opts = {'sources': gd77_src,
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[wrap-git]
|
||||
url = https://github.com/drowe67/codec2
|
||||
revision = a298f3789d7ef9e829049ebe14da8845d97ba8c1
|
||||
patch_directory = codec2
|
|
@ -0,0 +1,37 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
|
||||
FILE........: version.h
|
||||
AUTHOR......: Tomas Härdin
|
||||
DATE CREATED: 03 November 2017
|
||||
|
||||
Codec 2 VERSION #defines
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
Copyright (C) 2017 Tomas Härdin
|
||||
|
||||
All rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License version 2.1, as
|
||||
published by the Free Software Foundation. This program is
|
||||
distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
//this functions both as an include guard and your typical HAVE macro
|
||||
#ifndef CODEC2_HAVE_VERSION
|
||||
#define CODEC2_HAVE_VERSION
|
||||
|
||||
#define CODEC2_VERSION_MAJOR 1
|
||||
#define CODEC2_VERSION_MINOR 0
|
||||
/* #undef CODEC2_VERSION_PATCH */
|
||||
#define CODEC2_VERSION "1.0"
|
||||
|
||||
#endif //CODEC2_HAVE_VERSION
|
|
@ -0,0 +1,37 @@
|
|||
project('codec2', 'cpp')
|
||||
|
||||
cmake = import('cmake')
|
||||
|
||||
codec2_inc = include_directories('.', 'src')
|
||||
codec2_src = ['src/dump.c',
|
||||
'src/lpc.c',
|
||||
'src/nlp.c',
|
||||
'src/phase.c',
|
||||
'src/quantise.c',
|
||||
'src/postfilter.c',
|
||||
'src/codec2.c',
|
||||
'src/codec2_fft.c',
|
||||
'src/lsp.c',
|
||||
'src/sine.c',
|
||||
'src/interp.c',
|
||||
'src/kiss_fft.c',
|
||||
'src/kiss_fftr.c',
|
||||
'src/newamp1.c',
|
||||
'src/codebook.c',
|
||||
'src/codebookd.c',
|
||||
'src/pack.c',
|
||||
'src/codebooknewamp1.c',
|
||||
'src/codebooknewamp1_energy.c']
|
||||
|
||||
add_project_arguments('-DCODEC2_MODE_EN_DEFAULT=0', language : 'c')
|
||||
add_project_arguments('-DCODEC2_MODE_3200_EN=1' , language : 'c')
|
||||
add_project_arguments('-DCODEC2_MODE_1600_EN=1' , language : 'c')
|
||||
add_project_arguments('-DFREEDV_MODE_EN_DEFAULT=0', language : 'c')
|
||||
|
||||
codec2 = static_library('codec2',
|
||||
codec2_src,
|
||||
include_directories : codec2_inc,
|
||||
install : false)
|
||||
|
||||
codec2_dep = declare_dependency(include_directories : codec2_inc,
|
||||
link_with : codec2)
|
Ładowanie…
Reference in New Issue