Quickstart
----------
-$ cd codec2-dev
+$ cd codec2
$ ./configure && make
$ cd src
1/ First install Codec 2:
- david@cool:~$ svn co https://freetel.svn.sourceforge.net/svnroot/freetel/codec2-dev codec2-dev
- david@cool:~/codec2-dev$ cd codec2-dev
- david@cool:~/codec2-dev$ ./configure && make && sudo make install
- david@bear:~/codec2-dev$ sudo ldconfig -v
- david@cool:~/codec2-dev$ cd ~
+ david@cool:~$ svn co https://freetel.svn.sourceforge.net/svnroot/freetel/codec2 codec2
+ david@cool:~/codec2$ cd codec2
+ david@cool:~/codec2$ ./configure && make && sudo make install
+ david@bear:~/codec2$ sudo ldconfig -v
+ david@cool:~/codec2$ cd ~
2/ Then build Asterisk with Codec 2 support:
david@cool:~$ tar xvzf asterisk-1.8.9.0.tar.gz
- david@cool:~/asterisk-1.8.9.0$ patch -p4 < ~/codec2-dev/asterisk/asterisk-codec2.patch
- david@cool:~/asterisk-1.8.9.0$ cp ~/codec2-dev/asterisk/codec_codec2.c .
- david@cool:~/asterisk-1.8.9.0$ cp ~/codec2-dev/asterisk/ex_codec2.h ./codecs
+ david@cool:~/asterisk-1.8.9.0$ patch -p4 < ~/codec2/asterisk/asterisk-codec2.patch
+ david@cool:~/asterisk-1.8.9.0$ cp ~/codec2/asterisk/codec_codec2.c .
+ david@cool:~/asterisk-1.8.9.0$ cp ~/codec2/asterisk/ex_codec2.h ./codecs
david@cool:~/asterisk-1.8.9.0$ ./configure && make ASTLDFLAGS=-lcodec2
david@cool:~/asterisk-1.8.9.0$ sudo make install
david@cool:~/asterisk-1.8.9.0$ sudo make samples
% for conference and user group presentations on a projector. An
% alternative to static overhead slides.
%
-% Derived from codec2-dev/octave/plamp.m
+% Derived from codec2/octave/plamp.m
%
% usage:
% octave:1> plamp("../src/hts2a",40)
%
% The text files used as input are generated using c2sim:
%
-% /codec2-dev/src$ c2sim ../raw/hts2a.raw --dump hts2a
+% /codec2/src$ c2sim ../raw/hts2a.raw --dump hts2a
%
% The Codec 2 README explains how to build c2sim with dump files
% enabled.
% Used in conjunction with src/fdmdv_demod to test the
% fdmdv_get_rx_spectrum() function.
%
-% codec2-dev/src$ ./fdmdv_demod fdmdv_mod.raw tmp.c2 dump.txt
+% codec2/src$ ./fdmdv_demod fdmdv_mod.raw tmp.c2 dump.txt
% octave:3> tget_spec("../src/dump.txt")
%
% Copyright David Rowe 2012
. Place a copy of hts1a.raw in the stlink directory and start st-util:
- ~/stlink$ cp ~/codec2-dev/raw/hts1a.raw stm_in.raw
- ~/stlink$ sudo ./st-util -f /home/david/codec2-dev/stm32/stm32f4_codec2.elf
+ ~/stlink$ cp ~/codec2/raw/hts1a.raw stm_in.raw
+ ~/stlink$ sudo ./st-util -f /home/david/codec2/stm32/stm32f4_codec2.elf
. In _another_ console start gdb:
- $ ~/codec2-dev/stm32$ ~/gcc-arm-none-eabi-4_7-2013q1/bin/arm-none-eabi-gdb stm32f4_codec2.elf
+ $ ~/codec2/stm32$ ~/gcc-arm-none-eabi-4_7-2013q1/bin/arm-none-eabi-gdb stm32f4_codec2.elf
(gdb) tar ext :4242
(gdb) load
- `/home/david/codec2-dev/stm32/fft_test.elf' has changed; re-reading symbols.
+ `/home/david/codec2/stm32/fft_test.elf' has changed; re-reading symbols.
Loading section .isr_vector, size 0x188 lma 0x8000000
Loading section .text, size 0x1a4b4 lma 0x8000188
Loading section .data, size 0x28f0 lma 0x801a63c
I couldn't find an install command line that worked, so manually copied the libs and include files.\r
\r
9. Codec 2\r
- $ wget https://freetel.svn.sourceforge.net/svnroot/freetel/codec2-dev\r
- $ cd codec2-dev\r
+ $ wget https://freetel.svn.sourceforge.net/svnroot/freetel/codec2\r
+ $ cd codec2\r
$ ./configure && make\r
\r
10. svn co fdmdv2\r
+
+# Codec 2 -----------------------------------------------
+
-+CODEC2=codec2-dev
++CODEC2=codec2
+CODEC2_INC=-I$(CODEC2)/src
+CODEC2_LIB=$(CODEC2)/src/.libs/libcodec2.a
+
+ cd $(CODEC2) && CPPFLAGS="-arch i386" LDFLAGS="-arch i386" ./configure && make && touch .built
+
+$(CODEC2):
-+ svn co https://freetel.svn.sourceforge.net/svnroot/freetel/codec2-dev
++ svn co https://freetel.svn.sourceforge.net/svnroot/freetel/codec2
\ No newline at end of file
Index: src/Makefile.win32
===================================================================
RcCmpOptions := $(shell wx-config --rcflags)\r
RcCompilerName :=windres\r
LinkOptions := -mwindows $(shell wx-config --debug=yes --libs --unicode=yes)\r
-IncludePath := $(IncludeSwitch). $(IncludeSwitch)/bin/MinGW-4.7.1/msys/1.0/local/include $(IncludeSwitch)../../../codec2-dev/src $(IncludeSwitch)/bin/Projects/Audio/libsndfile/include \r
+IncludePath := $(IncludeSwitch). $(IncludeSwitch)/bin/MinGW-4.7.1/msys/1.0/local/include $(IncludeSwitch)../../../codec2/src $(IncludeSwitch)/bin/Projects/Audio/libsndfile/include \r
IncludePCH := \r
RcIncludePath := \r
Libs := $(LibrarySwitch)sndfile-1 $(LibrarySwitch)codec2 $(LibrarySwitch)portaudio $(LibrarySwitch)portaudiocpp $(LibrarySwitch)samplerate.dll $(LibrarySwitch)ctb-0.16 $(LibrarySwitch)sox \r
ArLibs := "libsndfile-1.dll" "codec2" "libportaudio.a" "libportaudiocpp.a" "libsamplerate.dll.a" "libctb-0.16.a" "libsox" \r
-LibPath := $(LibraryPathSwitch). $(LibraryPathSwitch)d:/Projects/Radio/codec2-dev/src/.libs $(LibraryPathSwitch)d:/bin/MinGW-4.7.1/msys/1.0/local/lib \r
+LibPath := $(LibraryPathSwitch). $(LibraryPathSwitch)d:/Projects/Radio/codec2/src/.libs $(LibraryPathSwitch)d:/bin/MinGW-4.7.1/msys/1.0/local/lib \r
\r
##\r
## Common variables\r
$(IntermediateDirectory)/src_dlg_about$(PreprocessSuffix): ../../src/dlg_about.cpp\r
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_dlg_about$(PreprocessSuffix) "../../src/dlg_about.cpp"\r
\r
-$(IntermediateDirectory)/src_golay23$(ObjectSuffix): ../../../codec2-dev/src/golay23.c $(IntermediateDirectory)/src_golay23$(DependSuffix)\r
- $(CC) $(SourceSwitch) "D:/Projects/Radio/codec2-dev/src/golay23.c" $(CFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_golay23$(ObjectSuffix) $(IncludePath)\r
-$(IntermediateDirectory)/src_golay23$(DependSuffix): ../../../codec2-dev/src/golay23.c\r
- @$(CC) $(CFLAGS) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/src_golay23$(ObjectSuffix) -MF$(IntermediateDirectory)/src_golay23$(DependSuffix) -MM "../../../codec2-dev/src/golay23.c"\r
+$(IntermediateDirectory)/src_golay23$(ObjectSuffix): ../../../codec2/src/golay23.c $(IntermediateDirectory)/src_golay23$(DependSuffix)\r
+ $(CC) $(SourceSwitch) "D:/Projects/Radio/codec2/src/golay23.c" $(CFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_golay23$(ObjectSuffix) $(IncludePath)\r
+$(IntermediateDirectory)/src_golay23$(DependSuffix): ../../../codec2/src/golay23.c\r
+ @$(CC) $(CFLAGS) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/src_golay23$(ObjectSuffix) -MF$(IntermediateDirectory)/src_golay23$(DependSuffix) -MM "../../../codec2/src/golay23.c"\r
\r
-$(IntermediateDirectory)/src_golay23$(PreprocessSuffix): ../../../codec2-dev/src/golay23.c\r
- @$(CC) $(CFLAGS) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_golay23$(PreprocessSuffix) "../../../codec2-dev/src/golay23.c"\r
+$(IntermediateDirectory)/src_golay23$(PreprocessSuffix): ../../../codec2/src/golay23.c\r
+ @$(CC) $(CFLAGS) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_golay23$(PreprocessSuffix) "../../../codec2/src/golay23.c"\r
\r
\r
-include $(IntermediateDirectory)/*$(DependSuffix)\r
<File Name="../../src/varicode.c"/>
<File Name="../../src/sox_biquad.c"/>
<File Name="../../src/dlg_about.cpp"/>
- <File Name="../../../codec2-dev/src/golay23.c"/>
+ <File Name="../../../codec2/src/golay23.c"/>
</VirtualDirectory>
<VirtualDirectory Name="include">
<File Name="../../src/dlg_comports.h"/>
<File Name="../../src/fdmdv2_pa_wrapper.h"/>
<File Name="../../src/comp.h"/>
<File Name="../../src/fdmdv2_plot_scalar.h"/>
- <File Name="../../../codec2-dev/src/codec2.h"/>
+ <File Name="../../../codec2/src/codec2.h"/>
<File Name="../../src/fdmdv2_defines.h"/>
<File Name="../../../Audio/libsndfile/include/sndfile.h"/>
<File Name="../../src/fdmdv2_plot_waterfall_linux.h"/>
<File Name="../../../../Audio/portaudio/include/portaudio.h"/>
<File Name="../../src/dlg_filter.h"/>
<File Name="../../src/version.h"/>
- <File Name="../../../codec2-dev/src/golay23.h"/>
+ <File Name="../../../codec2/src/golay23.h"/>
</VirtualDirectory>
<VirtualDirectory Name="resources">
<File Name="../../src/FDMDV2.fbp"/>
<Configuration Name="Debug" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="-g;-O0;-Wall;$(shell wx-config --cxxflags --unicode=yes --debug=yes)" C_Options="-g;-O0;-Wall;$(shell wx-config --cxxflags --unicode=yes --debug=yes)" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" UseDifferentPCHFlags="no" PCHFlags="">
<IncludePath Value="/bin/MinGW-4.7.1/msys/1.0/local/include"/>
- <IncludePath Value="../../../codec2-dev/src"/>
+ <IncludePath Value="../../../codec2/src"/>
<IncludePath Value="/bin/Projects/Audio/libsndfile/include"/>
<Preprocessor Value="__WX__"/>
<Preprocessor Value="_NO_AUTOTOOLS_=1"/>
<Preprocessor Value="DMW=1"/>
</Compiler>
<Linker Options="-mwindows;$(shell wx-config --debug=yes --libs --unicode=yes)" Required="yes">
- <LibraryPath Value="d:/Projects/Radio/codec2-dev/src/.libs"/>
+ <LibraryPath Value="d:/Projects/Radio/codec2/src/.libs"/>
<LibraryPath Value="d:/bin/MinGW-4.7.1/msys/1.0/local/lib"/>
<Library Value="libsndfile-1.dll"/>
<Library Value="codec2"/>
<Configuration Name="Release" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="-O2;-Wall;$(shell wx-config --cxxflags --unicode=yes --debug=no)" C_Options="-O2;-Wall;$(shell wx-config --cxxflags --unicode=yes --debug=no)" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" UseDifferentPCHFlags="no" PCHFlags="">
<IncludePath Value="/bin/MinGW-4.7.1/msys/1.0/local/include"/>
- <IncludePath Value="../../../codec2-dev/src"/>
+ <IncludePath Value="../../../codec2/src"/>
<IncludePath Value="../../../Audio/portaudio/include"/>
<IncludePath Value="../../../Audio/libsndfile/include"/>
<IncludePath Value="../../../Audio/libsamplerate-0.1.8/src"/>
<Preprocessor Value="_NO_AUTOTOOLS_=1"/>
</Compiler>
<Linker Options="-mwindows;-s;$(shell wx-config --debug=no --libs --unicode=yes)" Required="yes">
- <LibraryPath Value="d:/Projects/Radio/codec2-dev/src/.libs"/>
+ <LibraryPath Value="d:/Projects/Radio/codec2/src/.libs"/>
<LibraryPath Value="d:/bin/MinGW-4.7.1/msys/1.0/local/lib"/>
<LibraryPath Value="d:/Projects/Audio/libsndfile/lib"/>
<Library Value="libsndfile-1.dll"/>
include(ExternalProject)
ExternalProject_Add(codec2
- SVN_REPOSITORY https://svn.code.sf.net/p/freetel/code/codec2-dev
+ SVN_REPOSITORY https://svn.code.sf.net/p/freetel/code/codec2
CMAKE_ARGS -DBUILD_SHARED_LIBS=FALSE
INSTALL_COMMAND ""
)
<File Name="extern/include/portaudiocpp/SystemHostApiIterator.hxx"/>
</VirtualDirectory>
<File Name="paclass.h"/>
- <File Name="../codec2-dev/src/codec2.h"/>
- <File Name="../codec2-dev/src/fdmdv.h"/>
+ <File Name="../codec2/src/codec2.h"/>
+ <File Name="../codec2/src/fdmdv.h"/>
</VirtualDirectory>
<VirtualDirectory Name="resources">
<File Name="FDMDV2.fbp"/>
<Configuration Name="Debug" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="-g;-O0;-Wall;$(shell wx-config --cxxflags --unicode=yes --debug=yes)" C_Options="-g;-O0;-Wall;$(shell wx-config --cxxflags --unicode=yes --debug=yes)" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" UseDifferentPCHFlags="no" PCHFlags="">
<IncludePath Value="/bin/MinGW/msys/1.0/local/include"/>
- <IncludePath Value="../codec2-dev/src"/>
+ <IncludePath Value="../codec2/src"/>
<Preprocessor Value="__WX__"/>
</Compiler>
<Linker Options="-mwindows;$(shell wx-config --debug=yes --libs --unicode=yes)" Required="yes">
<Configuration Name="Release" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="-O2;-Wall;$(shell wx-config --cxxflags --unicode=yes --debug=no)" C_Options="-O2;-Wall;$(shell wx-config --cxxflags --unicode=yes --debug=no)" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" UseDifferentPCHFlags="no" PCHFlags="">
<IncludePath Value="/bin/MinGW/msys/1.0/local/include"/>
- <IncludePath Value="../codec2-dev/src"/>
+ <IncludePath Value="../codec2/src"/>
<IncludePath Value="../../Audio/portaudio/include"/>
<IncludePath Value="../../Audio/portaudio/bindings/cpp/include"/>
<IncludePath Value="./libsndfile/include"/>
# Codec 2 -----------------------------------------------
-CODEC2=codec2-dev
+CODEC2=codec2
CODEC2_INC=-I$(CODEC2)/src
CODEC2_LIB=$(CODEC2)/src/.libs/libcodec2.a
dlg_options.o \
varicode.o \
sox_biquad.o \
-codec2-dev/src/golay23.c \
+codec2/src/golay23.c \
hamlib.o
all: $(LIBS_TO_BUILD) $(CODEC2)/.built freedv
cd $(CODEC2) && ./configure && make && touch .built
$(CODEC2):
- svn co https://freetel.svn.sourceforge.net/svnroot/freetel/codec2-dev
+ svn co https://freetel.svn.sourceforge.net/svnroot/freetel/codec2
# sox -------------------------------------------------------------
# EDIT THESE FOR YOUR SYSTEM ----------------------------
WX_GTK_PATH=/home/wittend/Projects/wxWidgets-2.9.4/build_gtk
-CODEC2_PATH=/home/wittend/Projects/codec2-dev
+CODEC2_PATH=/home/wittend/Projects/codec2
# SOX_LIB_PATH=$(HOME)/sox-14.4.0/src/.libs - not required because I installed soxlib from the repo.
# END EDITS ---------------------------------------------
#
# $ make -f Makefile.Win32
-CODEC2_PATH=$(HOME)/codec2-dev
+CODEC2_PATH=$(HOME)/codec2
INCLUDE_PATH=/usr/local/include
WX_CONFIG=wx-config
varicode.o \
sox_biquad.o \
hamlib.o \
-../../codec2-dev/src/golay23.o
+../../codec2/src/golay23.o
-HDRS = version.h dlg_audiooptions.h dlg_ptt.h dlg_filter.h fdmdv2_main.h fdmdv2_defines.h fdmdv2_plot.h fdmdv2_plot_scalar.h fdmdv2_plot_waterfall.h fdmdv2_plot_scatter.h fdmdv2_plot_spectrum.h fdmdv2_pa_wrapper.h topFrame.h dlg_audiooptions.h topFrame.h varicode.h ../../codec2-dev/src/golay23.h hamlib.h
+HDRS = version.h dlg_audiooptions.h dlg_ptt.h dlg_filter.h fdmdv2_main.h fdmdv2_defines.h fdmdv2_plot.h fdmdv2_plot_scalar.h fdmdv2_plot_waterfall.h fdmdv2_plot_scatter.h fdmdv2_plot_spectrum.h fdmdv2_pa_wrapper.h topFrame.h dlg_audiooptions.h topFrame.h varicode.h ../../codec2/src/golay23.h hamlib.h
all: freedv
# EDIT THESE FOR YOUR SYSTEM ----------------------------
-CODEC2_PATH=D:/Projects/Radio/codec2-dev
+CODEC2_PATH=D:/Projects/Radio/codec2
INCLUDE_PATH=d:/bin/MinGW-4.6.1/msys/1.0/local/lib
# not required because I installed soxlib in my: