Skip to content

Commit

Permalink
Merge pull request #15 from drowe67/dr-debug-vac-3
Browse files Browse the repository at this point in the history
Debugging Windows Virtual Audio Cables
  • Loading branch information
drowe67 authored Jun 21, 2019
2 parents 07b08a5 + a7aaadc commit ab91977
Show file tree
Hide file tree
Showing 11 changed files with 252 additions and 466 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ if(WIN32)
endif()
if(FREEDV_VERSION_SUFFIX)
#set(CPACK_PACKAGE_VERSION_PATCH "${CPACK_PACKAGE_VERSION_PATCH}-${FREEDV_VERSION_SUFFIX}")
set(CPACK_PACKAGE_VERSION_PATCH "${CPACK_PACKAGE_VERSION_PATCH}-${FREEDV_VERSION_SUFFIX}-${DATE_RESULT}")
set(CPACK_PACKAGE_VERSION_PATCH "${CPACK_PACKAGE_VERSION_PATCH}-${FREEDV_VERSION_SUFFIX}-${DATE_RESULT}-${FREEDV_HASH}")
message(STATUS "package name = ${CPACK_PACKAGE_VERSION_PATCH}")
endif()
# There is a bug in NSI that does not handle full unix paths properly. Make
Expand Down
33 changes: 14 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,36 +56,31 @@ Enable Freetel specific packages not currently in Fedora proper:
mingw{32,64}-portaudio mingw{32,64}-libsndfile mingw{32,64}-libsamplerate.noarch
```

Bootstrap codec2 and LPCNet:
This assumes all git checkouts are from your home directory.
Clone freedv-gui:
```
$ git clone https://github.com/drowe67/codec2.git
$ cd codec2 && mkdir build_win && cd build_win
$ mingw64-cmake ../
$ make
$ cd
$ git clone https://github.com/drowe67/LPCNet.git
$ cd LPCNet && mkdir build_win && cd build_win
$ mingw64-cmake ../ -DCODEC2_BUILD_DIR=~/codec2/build_win
$ make
$ cd ~/codec2/build_win
$ mingw64-cmake ../ -DLPCNET_BUILD_DIR=~/LPCNet/build_win
$ make
$ git clone https://github.com/drowe67/freedv-gui.git
```

Building FreeDV for 64 Bit windows:
```
$ cd
$ git clone https://github.com/drowe67/freedv-gui.git
$ cd freedv-gui && mkdir build_wins && cd build_win
$ mingw64-cmake ../ -DCODEC2_BUILD_DIR=~/codec2/build_win -D LPCNET_BUILD_DIR=~/LPCNet/build_win
$ make
$ cd ~/freedv-gui
$ ./build_windows.sh
$ cd build_win64
$ make package
```

**OR** Building FreeDV for 32 Bit windows:
```
$ cd ~/freedv-gui
$ CMAKE=mingw32-cmake ./build_windows.sh
$ cd build_win32
$ make package
```

### Testing Windows Build

Conveniently, it is possible to run Windows executable using Wine on Fedora:
Conveniently, it is possible to run Windows executables using Wine on Fedora:

Testing LPCNet:
```
Expand Down
12 changes: 10 additions & 2 deletions USER_MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,17 @@ for another program?
4. Contact the digital voice mailing list. Be specific about your
hardware, what you have tried, and the exact nature of the problem.

### The FreeDV 2020 mode button isn grayed out
### FreeDV 2020 mode is greyed out

You must have a modern CPU with AVX support to run FreeDV 2020. A
Microsoft utlity called **coreinfo** can be used to determine if your
CPU supports AVX.

### I installed a new version and FreeDV stopped working

You may need to clean out the previous confirguration. Try
Tools-Restore Defaults.

You don't have AVX support on your CPU. FreeDV 2020 requires AVX to run.

## Voice Keyer

Expand Down
27 changes: 18 additions & 9 deletions build_windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@
# Linux. Git pulls codec2 and LPCNet repos so they are available for
# parallel development.

# override this at the command line for a 32 bit build
# $ CMAKE=mingw32-cmake ./build_windows.sh
: ${CMAKE=mingw64-cmake}

if [ $CMAKE = "mingw64-cmake" ]; then
BUILD_DIR=build_win64
else
BUILD_DIR=build_win32
fi
export FREEDVGUIDIR=${PWD}
export CODEC2DIR=$FREEDVGUIDIR/codec2
export LPCNETDIR=$FREEDVGUIDIR/LPCNet
Expand All @@ -13,32 +22,32 @@ export LPCNETDIR=$FREEDVGUIDIR/LPCNet
cd $FREEDVGUIDIR
git clone https://github.com/drowe67/codec2.git
cd codec2 && git checkout master && git pull
mkdir -p build_win && cd build_win && rm -Rf *
mingw64-cmake .. && make
mkdir -p $BUILD_DIR && cd $BUILD_DIR && rm -Rf *
$CMAKE .. && make

# OK, build and test LPCNet
cd $FREEDVGUIDIR
git clone https://github.com/drowe67/LPCNet.git
cd $LPCNETDIR && git checkout master && git pull
mkdir -p build_win && cd build_win && rm -Rf *
mingw64-cmake -DCODEC2_BUILD_DIR=$CODEC2DIR/build_win ..
mkdir -p $BUILD_DIR && cd $BUILD_DIR && rm -Rf *
$CMAKE -DCODEC2_BUILD_DIR=$CODEC2DIR/$BUILD_DIR ..
make
# sanity check test
#cd src && ../../wav/wia.wav -t raw -r 16000 - | ./lpcnet_enc -s | ./lpcnet_dec -s > /dev/null

# Re-build codec2 with LPCNet and test FreeDV 2020 support
cd $CODEC2DIR/build_win && rm -Rf *
mingw64-cmake -DLPCNET_BUILD_DIR=$LPCNETDIR/build_win ..
cd $CODEC2DIR/$BUILD_DIR && rm -Rf *
$CMAKE -DLPCNET_BUILD_DIR=$LPCNETDIR/$BUILD_DIR ..
make VERBOSE=1
# sanity check test
#cd src
#export LD_LIBRARY_PATH=$LPCNETDIR/build_win/src
#export LD_LIBRARY_PATH=$LPCNETDIR/$BUILD_DIR/src
#./freedv_tx 2020 $LPCNETDIR/wav/wia.wav - | ./freedv_rx 2020 - /dev/null

# Finally, build freedv-gui
cd $FREEDVGUIDIR && git pull
mkdir -p build_win && cd build_win && rm -Rf *
mingw64-cmake -DCMAKE_BUILD_TYPE=Debug -DCODEC2_BUILD_DIR=$CODEC2DIR/build_win -DLPCNET_BUILD_DIR=$LPCNETDIR/build_win ..
mkdir -p $BUILD_DIR && cd $BUILD_DIR && rm -Rf *
$CMAKE -DCMAKE_BUILD_TYPE=Debug -DCODEC2_BUILD_DIR=$CODEC2DIR/$BUILD_DIR -DLPCNET_BUILD_DIR=$LPCNETDIR/$BUILD_DIR ..
make VERBOSE=1


32 changes: 32 additions & 0 deletions build_windows_old.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
# build_windows_old.sh
#
# Script that cross compiles freedv-gui for Windows on Fedora
# Linux. Git pulls older versions of freedv-gui for test/debug purposes,
# then constructs a zip file for testing. Zips files are convenient
# when testing several versions, as everything is self contained.
#
# usage: ./build_old.sh githash

export FREEDVGUIDIR=${PWD}
export CODEC2DIR=$FREEDVGUIDIR/codec2
export LPCNETDIR=$FREEDVGUIDIR/LPCNet
#git checkout $1
#mkdir -p build_win && cd build_win && rm -Rf *
#make VERBOSE=1
git checkout dr-debug-vac-3
#git checkout $1
cd $FREEDVGUIDIR/build_win
rm -Rf *
# old cmake line
mingw64-cmake -DCMAKE_BUILD_TYPE=Debug -DCODEC2_BUILD_DIR=$CODEC2DIR/build_win -DLPCNET_BUILD_DIR=$LPCNETDIR/build_win ..
make
make package
cd $FREEDVGUIDIR
export zipdir=freedv-gui-$1
mkdir -p $zipdir
cp -f `find build_win/_CPack_Packages -name *.dll` $zipdir
cp -f `find codec2/build_win/ -name *.dll` $zipdir
cp -f `find LPCNet/build_win/ -name *.dll` $zipdir
cp build_win/src/freedv.exe $zipdir
zip -r $zipdir'.zip' $zipdir
Loading

0 comments on commit ab91977

Please sign in to comment.