How to install Install Portaudio for use with Linrad.
(June 10 2015)

Portaudio.

PortAudio is a free, cross platform, open-source, audio I/O library. It lets you write simple audio programs in 'C' that will compile and run on many platforms including Windows and Linux.

Starting in version 03.09 Linrad can be compiled with portaudio. This means that Jack can be used under Linux to connect other programs to the output of Linrad.

Under Windows the inclusion of Portaudio means that ASIO and other fast drivers become available which is very important for Windows Vista and Windows 7 where output through the old Windows MME drivers is slow.

The portaudio interface in Linrad-03.09 is written for Portaudio version 19. Linrads old direct interface to the soundcards via the MME drivers is left in place and the user can select to use the old routines or to access the sound system through Portaudio.

Linrad may use four soundcard channels:

1. Receiver input (Disabled when SDR-14 or other USB devices are used.)
2. Receiver output (Can be disabled. Typically when writing the output to the network.)
3. Transmitter input (Early development stage).
4. Transmitter output (Early development stage).

Currently only the receiver output can be set to use Portaudio.

Portaudio for Linrad under Windows.

Linrad-04.02 and later load a dll for Portaudio at run time and the dll is then not needed at compile time.

Linrad-03.09 to Linrad-03.11 have three different executables with different alternatives for portaudio. Linrad-03.12 and later have just one executable, linrad.exe It is necessary to have palir-01.dll available to Linrad in order to run Linrad-03.12 and later under Microsoft Windows. Get palir-01.dll from here palir-01.zip (485835 bytes) or here palir-01.dll.bz2 (457609 bytes) Linrad-03.23 and later are compiled with palir02.dll by default but you can re-compile with palir-01.dll if you wish. Get palir-02.dll from here palir-02.zip (493856 bytes) or here palir-02.dll.bz2 (462419 bytes)

To compile older versions of Linrad (03.09 to 03.11) for Windows you will need the files pa-lir.lib and/or pa-vclir.lib to compile linradpa.exe and linradvc.exe. They are available here: linrad-pa.zip (30595 bytes) and here linrad-pa.tbz (23914 bytes)

Portaudio for Linrad under Linux.

Portaudio must be installed after Jack in case you want to use Jack. On a 64 bit system the 32 bit version of Jack has to be installed.

Jack can be installed with the system installer that belongs to your Linux distribution. Install these packages:

Debian and Ubuntu
jackd
libjack0
libjack0-dev

Mandriva
jack
qjackctl
libalsa-plugins-jack
libsamplerate-progs
libbio2jack0
libjack-devel
libbio2jack-devel
jackit
arts

Fedora
jack-audio-connection-kit
qjackctl

Suse 64bit
jack-32bit
libjack0-32bit
qjackctl
alsa-plugins-jack-32bit

Fedora 64 bit
qjackctl
jack-audio-connection-kit-devel-0.116.1-4.fc11.i586

The installers take care of dependencies. The above lists might contain too many packages. I do not know what is really needed, but with the above lists I have produced working installations of Linrad with Portaudio and Jack under the specified distributions.

Download the latest portaudio source code from http://www.portaudio.com/download.html

Get root privileges (sudo su root under Ubuntu where plain su root does not work.) Place the portaudio archive in /usr/src and unpack it with tar xvfz pa_snapshot.tgz This will generate the directory /usr/src/portaudio. Descend into this directory and execute these commands:

./configure
make
make install
ldconfig


The linrad configure script has to be run after the sucessful installation of portaudio to make Linrad aware of the fact that portaudio is available.

Portaudio for Windows when compiling from source code.

How to generate palir-04.dll from source code for use with linrad-04.06 and later.

palir-04.dll provides Hostapi's for MME, DirectSound, WDM-KS, WASAPI and ASIO.

The installation steps are:

1. Install MinGW/GCC 3.4.5 by downloading mingw516nasmplus.zip Unzip it in C:\ to get a C:\mingw directory. (DO NOT use older mingw versions or the compilation will fail.)

2. Download portaudiomay15.zip (1797290 bytes) which is the portaudio snapshot dated 15 may 2015. Unpack it into C:\ to get a C:\portaudio directory.

3. Go to: http://www.steinberg.net/en/company/developers.html Register and agree to their license agreement. Then you can login as a 3rd party developer and download the asiosdk2.3.zip file from Steinberg.depends Unzip it and copy the ASIOSDK2.3 folder with its subdirectories to C:\portaudio\src\hostapi\asio\ASIOSDK2

4. Download palir-03_files_for_linrad.zip (124611 bytes) Unzip it while preserving the path information to get a folder palir-03_files_for_linrad with sub-folders in it.

-Copy the folder dx8sdk from palir-03_files_for_linrad to the C:\portaudio directory.
-Copy the mingw-include folder from palir-03_files_for_linrad to C:\portaudio\src\hostapi\wdmks\mingw-include
-Copy the files Makefile make.bat clear.bat from palir-03_files_for_linrad to the C:\portaudio directory.

5. Open now a command window (DOS prompt) in Windows. From the DOS prompt, cd to the C:\portaudio directory and enter the commandmake.bat

In case there are no fatal errors you would get the palir-03.dll file in the portaudio directory.

Notes:
-----

1. The make.bat command will also generate three portaudio test programs in the portaudio directory:

patest_read_record.exe
patest_mono.exe
patest_leftright.exe

If the test programs run fine, copy the palir-03.dll file into the linrad directory or into your system directory. In case you already selected another dll file for Portaudio you must edit par_userint and set the parameter Native ALSA to zero or delete the par_userint file entirely.

2. If you want to keep ALL the output of the compilation proces (including error messages) you can route the output to a text file with the following command:
make.bat > make_output.txt 2>&1

3. The palir-03.dll file can be generated with a debug option. This debug option will generate debugging information in the DOS box from which you started linrad. To activate this debug option you have to modify line 3 in Makefile by adding -DPA_ENABLE_DEBUG_OUTPUT= at the end of the line as follows: CF1= -c -DWIN32 -D_WIN32 -DWINDOWS -DKSAUDIO_SPEAKER_DIRECTOUT=0 -DMETHOD_NEITHER=3 -DFILE_ANY_ACCESS=0 -DWINVER=0x0501 -DPA_ENABLE_DEBUG_OUTPUT=

For use with linrad versions older than 04.02 only palir-01 and palir-02.dll can be used. Here is info about old versions.

All the work of interfacing Linrad to portaudio was done by Pierre, ON5GN who once again made a major contribution to the Linrad development.


To SM 5 BSZ Main Page