PortAudio Tutorial |
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.cTo use ASIO with the PortAudio library add the following:
pa_common/portaudio.h
pa_common/pa_host.hpa_asio/pa_asio.cpp
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.cppThe ASIO drivers should be in a folder called "ASIO Drivers" beneath your application.
host/mac/asioshlib.cpp
host/mac/codefragements.cpp
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 | previous | next
- select "Settings..." from the "Project" menu,
- select the project name in the tree on the left,
- choose "All Configurations" in the popup menu above the tree,
- select the "Link" tab,
- enter "winmm.lib", without quotes, as the first item in the "Object/library modules:" field.