PortAudio Tutorial

home | contents | previousnext

Compiling for ASIO (Windows or Macintosh)

ASIO is a low latency audio API from Steinberg. To compile an ASIO application, you must first download the ASIO SDK from Steinberg. You also need to obtain ASIO drivers from the manufacturer of your audio hardware.

Note: I am using '/' as a file separator below. On Macintosh replace '/' with ':'. On Windows, replace '/' with '\'.

You may try compiling the "pa_tests/patest_saw.c" file first because it is the simplest.

Several files are common to all PortAudio implementations. Add the following source files to your project:

pa_common/pa_lib.c
pa_common/portaudio.h
pa_common/pa_host.h
To use ASIO with the PortAudio library add the following:
pa_asio/pa_asio.cpp

Macintosh Specific

Note: there is a bug in the Macintosh ASIO code. Mac users should read the file "pa_asio:readme_asio_sdk_patch.txt" for information on how to fix the bug.

Add these files from the ASIO SDK downloaded from Steinberg:

host/asiodrivers.cpp
host/mac/asioshlib.cpp
host/mac/codefragements.cpp
The ASIO drivers should be in a folder called "ASIO Drivers" beneath your application.

Windows Specific

Add these files from the ASIO SDK downloaded from Steinberg:
host/asiodrivers.cpp
host/asiolist.cpp
common/asio.cpp
Add these directories to the path for include files:
host
host/pc
common
and link with the system library "winmm.lib". For MS Visual C++:
home | contents | previousnext