Just a quick update regarding my issue with the build:

We used the android cmake found inside the Android NDK to build codec2 on linux 
and added the compiled .so files and the header files in the cmakelist on 
Android to build the project.

$ANDROID_HOME/cmake/3.10.2.4988404/bin/cmake .. 
-DCMAKE_TOOLCHAIN_FILE=$NDK_HOME/build/cmake/android.toolchain.cmake 
-DUNITTEST=FALSE -DGENERATE_CODEBOOK=../build_linux/src/generate_codebook 
-DANDROID_NATIVE_API_LEVEL=23 -DANDROID_ABI=armeabi-v7a -DANDROID_NDK=$NDK_HOME

$ANDROID_HOME/cmake/3.10.2.4988404/bin/cmake --build

Where ANDROID_HOME is the base of the Android SDK directory
NDK_HOME is the base of the Android NDK installation

We are currently getting the project to playback the codec2 file on Android. We 
will be updated on demo github once its done, and contribute an Android README.

The LPCNet works look very relevant, 2kbps high quality voice would be great. 
We'll definitely be interested in integrating it.

Thanks
Samih

________________________________
From: Richard Shaw <hobbes1...@gmail.com>
Sent: February 21, 2019 1:25:37 AM
To: freetel-codec2@lists.sourceforge.net
Subject: Re: [Freetel-codec2] Codec2 on Android NDK

On Wed, Feb 20, 2019 at 10:55 AM Samih Mohammed 
<sa...@ustadmobile.com<mailto:sa...@ustadmobile.com>> wrote:

Hi,
We are trying to build an Android NDK project ( 
https://github.com/SamihMustafa/Codec2 ) with the latest version of the codec2 
source code. The project includes both libsamplerate and codec2. Our objective 
is to use codec2 to compress the voice on Khan Academy videos being used in an 
open source offline library app for use in areas with limited Internet. 
Libsamplerate compiles fine and generates libsamplerate.so . Unfortunately 
trying to build codec2 doesn't seem to work.

We receive the following error when building the codec2 project:
 What went wrong:
Execution failed for task ':app:externalNativeBuildDebug'.
> Build command failed.
  Error while executing process 
C:\Users\suhai\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe with 
arguments {--build 
C:\Users\suhai\AndroidStudioProjects\Codec2\app\.externalNativeBuild\cmake\debug\x86_64
 --target varispeed-play}

  ninja: error: build.ninja:2899: bad $-escape (literal $ must be written as $$)

Ok, the short version is that I'm directly calling make there which assumes 
unix makefiles not a ninja based build.

There are two options I see...

1. Force the build to use UNIX makefiles (just for that part of the build). Is 
this an option for Android?

2. I haven't done more that do a couple of google searches but it looks like 
it's possible to call "cmake --build --target" instead and then let cmake 
figure it out.

So line 81 would change to something like:

BUILD_COMMAND ${CMAKE_COMMAND} --built --target generate_codebook

Not exactly sure when I'll have time to test it but if that gives you enough to 
go on please try it out.

Thanks,
Richard
_______________________________________________
Freetel-codec2 mailing list
Freetel-codec2@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freetel-codec2

Reply via email to