These are ALSA loopback devices but on the VM, PulseAudio is still able to see and use them. I set them up by adding /etc/modprobe.d/vac.conf with the following:
options snd-aloop enable=1,1,1,1 index=4,5,6,7 id=vac1,vac2,vac3,vac4 pcm_substreams=2,2,2,2
update-source-proplist alsa_output.4.analog-stereo.monitor device.description=vac0.dest
update-source-proplist alsa_input.4.analog-stereo device.description=vac0
update-source-proplist alsa_output.5.analog-stereo.monitor device.description=vac1.dest
update-source-proplist alsa_input.5.analog-stereo device.description=vac1
update-source-proplist alsa_output.6.analog-stereo.monitor device.description=vac2.dest
update-source-proplist alsa_input.6.analog-stereo device.description=vac2
update-source-proplist alsa_output.7.analog-stereo.monitor device.description=vac3.dest
update-source-proplist alsa_input.7.analog-stereo device.description=vac3
update-sink-proplist alsa_output.4.analog-stereo device.description=vac0.source
update-sink-proplist alsa_output.5.analog-stereo device.description=vac1.source
update-sink-proplist alsa_output.6.analog-stereo device.description=vac2.source
update-sink-proplist alsa_output.7.analog-stereo device.description=vac3.source
With the above, vac0 and vac1 go between Quisk and FreeDV while vac2 and vac3 go between FreeDV and Mumble.
As for building FreeDV + static PortAudio, it looks like I made the following changes on my local copy (- = removed lines, + = added lines):
diff --git a/build_linux.sh b/build_linux.sh
index 8e26be4..76f530a 100755
--- a/build_linux.sh
+++ b/build_linux.sh
@@ -39,5 +39,5 @@ export LD_LIBRARY_PATH=$LPCNETDIR/build_linux/src
# Finally, build freedv-gui
cd $FREEDVGUIDIR && git pull
mkdir -p build_linux && cd build_linux && rm -Rf *
-cmake -DCMAKE_BUILD_TYPE=Debug -DCODEC2_BUILD_DIR=$CODEC2DIR/build_linux -DLPCNET_BUILD_DIR=$LPCNETDIR/build_linux ..
+cmake -DCMAKE_BUILD_TYPE=Debug -DCODEC2_BUILD_DIR=$CODEC2DIR/build_linux -DLPCNET_BUILD_DIR=$LPCNETDIR/build_linux -DUSE_STATIC_PORTAUDIO=1 ..
make VERBOSE=1
diff --git a/cmake/Buildportaudio-2.0.cmake b/cmake/Buildportaudio-2.0.cmake
index 7b1dd55..f2136d9 100644
--- a/cmake/Buildportaudio-2.0.cmake
+++ b/cmake/Buildportaudio-2.0.cmake
@@ -1,4 +1,4 @@
-set(PORTAUDIO_GIT "
https://github.com/PortAudio/portaudio.git")
+set(PORTAUDIO_GIT "
https://github.com/illuusio/portaudio.git")
# required linking libraries on linux. Not sure about windows.
find_library(ALSA_LIBRARIES asound)
@@ -22,7 +22,7 @@ else()
set(CONFIGURE_COMMAND ./configure --enable-cxx --enable-option-checking --without-alsa --without-jack --without-oss --without-asihpi --without-winapi --disable-shared --prefix=${CMAKE_BINARY_DIR}/external/dist CFLAGS=-g\ -O2\ -mmacosx-version-min=10.9 LDFLAGS=-framework\ CoreServices\ -framework\ AudioUnit\ -framework\ CoreFoundation\ -framework\ AudioToolbox\ -framework\ CoreAudio)
endif(BUILD_OSX_UNIVERSAL)
else()
- set(CONFIGURE_COMMAND ./configure --enable-cxx --without-jack --disable-shared --prefix=${CMAKE_BINARY_DIR}/external/dist)
+ set(CONFIGURE_COMMAND autoreconf -i && ./configure --enable-cxx --without-jack --with-pulseaudio --disable-shared --prefix=${CMAKE_BINARY_DIR}/external/dist)
endif()
include(ExternalProject)
@@ -40,7 +40,7 @@ ExternalProject_Add(portaudio
else()
ExternalProject_Add(portaudio
GIT_REPOSITORY ${PORTAUDIO_GIT}
- GIT_TAG origin/master
+ GIT_TAG PulseAudioHostAPI
BUILD_IN_SOURCE 1
INSTALL_DIR external/dist
CONFIGURE_COMMAND ${CONFIGURE_COMMAND}
@@ -58,7 +58,8 @@ if(WIN32)
elseif(NOT APPLE)
find_library(RT rt)
find_library(ASOUND asound)
- list(APPEND PORTAUDIO_LIBRARIES ${RT} ${ASOUND}
+ find_library(PULSE pulse)
+ list(APPEND PORTAUDIO_LIBRARIES ${RT} ${ASOUND} ${PULSE}
)
endif(WIN32)
include_directories(${CMAKE_BINARY_DIR}/external/dist/include)