Cocoa Framework for the Codec 2 low bit-rate speech codec. Provides both macOS and iOS targets and is Carthage compatible.
Used by CocoaDV and, by extension, Estrella, the ORF reflector client for macOS and iOS.
The included files were copied over from r3898
(2018-11-02) of the Codec 2 SVN repository.
I first compiled Codec 2 on macOS. I used MacPorts to install cmake
, speexDSP
, and libsamplerate
. To build, I had to export LIBRARY_PATH=$LIBRARY_PATH:/opt/local/lib
before running make
, and edit the following files to remove unsupported gcc
flags (from the build
folder):
unittest/CMakeFiles/ofdm_stack.dir/flags.make
, to remove-fstack-usage
unittest/CMakeFiles/ofdm_stack.dir/link.txt
, to remove-Wl,-Map=ofdm_stack.map
Then, I copied over:
- All files from
src
codebook*.c
frombuild
version.h
frombuild/codec2
In Xcode:
- In the targets’ Build Phases tab, under Headers, under Public, add all the files listed in
src/CMakeLists.txt
underCODEC2_PUBLIC_HEADERS
- In the project's Build Settings tab, under Apple Clang - Preprocessing, under Preprocessor Macros, add
HORUS_L2_RX=1
,INTERLEAVER=1
,SCRAMBLER=1
, andRUN_TIME_TABLES=1
- Fix the include in
codec2.h
- Remove all files producing executables (the ones used in
add_executable()
calls insrc/CMakeLists.txt
) - Clean up, by keeping all files listed in
src/CMakeLists.txt
underCODEC2_SRCS
and all files referenced by them
73 de SV9OAN