109 lines
3.5 KiB
HTML
109 lines
3.5 KiB
HTML
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<meta name="GENERATOR" content="Mozilla/4.79 [en] (Windows NT 5.0; U) [Netscape]">
|
|
<meta name="Author" content="Phil Burk">
|
|
<meta name="Description" content="Tutorial for PortAudio, a cross platform, open-source, audio I/O library.It provides a very simple API for recording and/or playing sound using a simple callback function.">
|
|
<meta name="KeyWords" content="audio, tutorial, library, portable, open-source, DirectSound,sound, music, JSyn, synthesis,">
|
|
<title>PortAudio Tutorial</title>
|
|
</head>
|
|
<body>
|
|
|
|
<center><table COLS=1 WIDTH="100%" BGCOLOR="#FADA7A" >
|
|
<tr>
|
|
<td>
|
|
<center>
|
|
<h1>
|
|
PortAudio Tutorial</h1></center>
|
|
</td>
|
|
</tr>
|
|
</table></center>
|
|
|
|
<h2>
|
|
<font size=+2><a href="http://www.portaudio.com/">home</a> |
|
|
<a href="pa_tutorial.html">contents</a>
|
|
| <a href="pa_tut_over.html">previous</a> | <a href="pa_tut_callback.html">next</a></font></h2>
|
|
|
|
<h2>
|
|
Compiling for ASIO (Windows or Macintosh)</h2>
|
|
|
|
<blockquote>ASIO is a low latency audio API from Steinberg. To compile
|
|
an ASIO application, you must first <a href="http://www.steinberg.net/en/ps/support/3rdparty/">download
|
|
the ASIO SDK</a> from Steinberg. You also need to obtain ASIO drivers from
|
|
the manufacturer of your audio hardware.
|
|
<p>Note: I am using '/' as a file separator below. On Macintosh replace
|
|
'/' with ':'. On Windows, replace '/' with '\'.
|
|
<p>You may try compiling the "pa_tests/patest_saw.c" file first because
|
|
it is the simplest.
|
|
<p>Several files are common to all PortAudio implementations. Add the following
|
|
source files to your project:
|
|
<blockquote>pa_common/pa_lib.c
|
|
<br>pa_common/portaudio.h
|
|
<br>pa_common/pa_host.h</blockquote>
|
|
To use ASIO with the PortAudio library add the following:
|
|
<blockquote>
|
|
<pre>pa_asio/pa_asio.cpp</pre>
|
|
</blockquote>
|
|
</blockquote>
|
|
|
|
<h3>
|
|
Macintosh Specific</h3>
|
|
|
|
<blockquote>Note: there is a bug in the <b>Macintosh</b> ASIO code. Mac
|
|
users should read the file "pa_asio:readme_asio_sdk_patch.txt" for information
|
|
on how to fix the bug.
|
|
<p>Add these files from the ASIO SDK downloaded from Steinberg:</blockquote>
|
|
|
|
<blockquote>
|
|
<blockquote><tt>host/asiodrivers.cpp</tt>
|
|
<br><tt>host/mac/asioshlib.cpp</tt>
|
|
<br><tt>host/mac/codefragements.cpp</tt></blockquote>
|
|
The ASIO drivers should be in a folder called "ASIO Drivers" beneath your
|
|
application.</blockquote>
|
|
|
|
<h3>
|
|
Windows Specific</h3>
|
|
|
|
<blockquote>Add these files from the ASIO SDK downloaded from Steinberg:</blockquote>
|
|
|
|
<blockquote>
|
|
<blockquote><tt>host/asiodrivers.cpp</tt>
|
|
<br><tt>host/asiolist.cpp</tt>
|
|
<br><tt>common/asio.cpp</tt></blockquote>
|
|
</blockquote>
|
|
|
|
<blockquote>Add these directories to the path for include files:</blockquote>
|
|
|
|
<blockquote>
|
|
<blockquote><tt>host</tt>
|
|
<br><tt>host/pc</tt>
|
|
<br><tt>common</tt></blockquote>
|
|
</blockquote>
|
|
|
|
<blockquote>and link with the system library "<b>winmm.lib</b>". For MS
|
|
Visual C++:
|
|
<ul>
|
|
<li>
|
|
select "Settings..." from the "Project" menu,</li>
|
|
|
|
<li>
|
|
select the project name in the tree on the left,</li>
|
|
|
|
<li>
|
|
choose "All Configurations" in the popup menu above the tree,</li>
|
|
|
|
<li>
|
|
select the "Link" tab,</li>
|
|
|
|
<li>
|
|
enter "winmm.lib", without quotes, as the first item in the "Object/library
|
|
modules:" field.</li>
|
|
</ul>
|
|
</blockquote>
|
|
<font size=+2><a href="http://www.portaudio.com/">home</a> |
|
|
<a href="pa_tutorial.html">contents</a>
|
|
| <a href="pa_tut_over.html">previous</a> | <a href="pa_tut_callback.html">next</a></font>
|
|
</body>
|
|
</html>
|