kopia lustrzana https://github.com/OpenRTX/OpenRTX
Added codec2 as meson run time dependency when compiling for linux target, substituting the static library compiled from sources.
Stub input audio stream driver for linux x86/x64 platform.replace/06ce7755a7fb6a528469719acf472c05d68f230f
rodzic
a9e1e68709
commit
952ce4b38f
15
meson.build
15
meson.build
|
@ -73,8 +73,14 @@ minmea_inc = ['lib/minmea/include']
|
|||
qdec_inc = ['lib/qdec/include']
|
||||
|
||||
# CODEC2, open source speech codec
|
||||
codec2_proj = subproject('codec2')
|
||||
codec2_dep = codec2_proj.get_variable('codec2_dep')
|
||||
# Compile from sources only when targeting a platform different from x86/x64
|
||||
if meson.is_cross_build()
|
||||
codec2_proj = subproject('codec2')
|
||||
codec2_dep = codec2_proj.get_variable('codec2_dep')
|
||||
else
|
||||
codec2_dep = dependency('codec2')
|
||||
endif
|
||||
|
||||
|
||||
##
|
||||
## RTOS
|
||||
|
@ -212,6 +218,7 @@ linux_src = src + ['platform/targets/linux/emulator/emulator.c',
|
|||
'platform/mcu/x86_64/drivers/rtc.c',
|
||||
'platform/drivers/baseband/radio_linux.cpp',
|
||||
'platform/drivers/audio/audio_linux.c',
|
||||
'platform/drivers/audio/inputStream_linux.c',
|
||||
'platform/targets/linux/platform.c']
|
||||
|
||||
|
||||
|
@ -226,9 +233,9 @@ linux_inc = inc + ['platform/targets/linux',
|
|||
if not meson.is_cross_build()
|
||||
sdl_dep = dependency('SDL2')
|
||||
threads_dep = dependency('threads')
|
||||
linux_dep = [sdl_dep, threads_dep]
|
||||
linux_dep = [sdl_dep, threads_dep, codec2_dep]
|
||||
else
|
||||
linux_dep = []
|
||||
linux_dep = [ ]
|
||||
endif
|
||||
|
||||
##
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2021 by Federico Amedeo Izzo IU2NUO, *
|
||||
* Niccolò Izzo IU2KIN *
|
||||
* Frederik Saraci IU2NRO *
|
||||
* Silvano Seva IU2KWO *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* 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 General Public License *
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/> *
|
||||
***************************************************************************/
|
||||
|
||||
#include <interfaces/audio_stream.h>
|
||||
#include <hwconfig.h>
|
||||
#include <stddef.h>
|
||||
|
||||
streamId inputStream_start(const enum AudioSource source,
|
||||
const enum AudioPriority prio,
|
||||
stream_sample_t * const buf,
|
||||
const size_t bufLength,
|
||||
const enum BufMode mode,
|
||||
const uint32_t sampleRate)
|
||||
{
|
||||
(void) source;
|
||||
(void) prio;
|
||||
(void) buf;
|
||||
(void) bufLength;
|
||||
(void) mode;
|
||||
(void) sampleRate;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
dataBlock_t inputStream_getData(streamId id)
|
||||
{
|
||||
(void) id;
|
||||
|
||||
dataBlock_t block;
|
||||
block.data = NULL;
|
||||
block.len = 0;
|
||||
return block;
|
||||
}
|
||||
|
||||
void inputStream_stop(streamId id)
|
||||
{
|
||||
(void) id;
|
||||
}
|
Ładowanie…
Reference in New Issue