For the latest build instructions for windows, please see the build/msvc/readme.txt file that comes with the PortAudio distribution. The instructions below are copied from that but could be out of date:
This is a small list of steps in order to build PortAudio (Currently v19-devel) into a VC6 DLL and lib file. This DLL contains all 3 current win32 PA APIS (MM/DS/ASIO).
1) Copy the source dirs that comes with the ASIO SDK inside src\hostapi\asio\ASIOSDK so you should now have example:
portaudio19svn\src\hostapi\asio\ASIOSDK\common portaudio19svn\src\hostapi\asio\ASIOSDK\host portaudio19svn\src\hostapi\asio\ASIOSDK\host\sample portaudio19svn\src\hostapi\asio\ASIOSDK\host\pc portaudio19svn\src\hostapi\asio\ASIOSDK\host\mac (not needed)
You dont need "driver"
To build without ASIO (or another Host API) see the "Building without ASIO support" section below.
2) If you have Visual Studio 6.0, 7.0(VC.NET/2001) or 7.1(VC.2003) then I suggest you open portaudio.dsp (and convert if needed)
If you have Visual Studio 2005, I suggest you open the portaudio.sln file which contains 4 configurations. Win32/x64 in both Release and Debug variants
hit compile and hope for the best.
3) Now in any project, in which you require portaudio, you can just link with portaudio_x86.lib, (or _x64) and of course include the relevant headers (portaudio.h, and/or pa_asio.h , pa_x86_plain_converters.h) See (*)
4) Your new exe should now use portaudio_xXX.dll.
Have fun!
(*): you may want to add/remove some DLL entry points. Right now those 6 entries are _not_ from portaudio.h
(from portaudio.def)
... PaAsio_GetAvailableLatencyValues @50 PaAsio_ShowControlPanel @51 PaUtil_InitializeX86PlainConverters @52 PaAsio_GetInputChannelName @53 PaAsio_GetOutputChannelName @54 PaUtil_SetLogPrintFunction @55
*** Building without ASIO support ***
To build PortAudio without ASIO support you need to:
A) Make sure your project doesn't try to build any ASIO SDK files.
If you're using one of the shipped projects, remove the ASIO related files from the project.
B) Make sure your project doesn't try to build the PortAudio ASIO implementation files:
src/hostapi/pa_asio.cpp src/hostapi/iasiothiscallresolver.cpp
If you're using one of the shipped projects remove them from the project.
C) Define the PA_NO_ASIO preprocessor symbol in the project properties.
In VS2005 this can be added under Project Properties > Configuration Properties > C/C++ > Preprocessor > Preprocessor Definitions
Defining PA_NO_ASIO stops src/os/win/pa_win_hostapis.c from trying to initialize the PA ASIO implementation.
D) Remove PaAsio?_* entry points from portaudio.def
A similar procedure can be used to omit any of the other host APIs from the build. The relevant preprocessor symbols used by pa_win_hostapis.c are: PA_NO_WMME, PA_NO_DS, PA_NO_ASIO, PA_NO_WASAPI and PA_NO_WDMKS
David Viens, davidv@…
