aboutsummaryrefslogtreecommitdiff
path: root/pd/portaudio_v18/docs/pa_tut_asio.html
blob: a7fa7d3a8cf8acb6af9cc76f35698bca2d620f1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!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>
&nbsp;
<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> |&nbsp; <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> |&nbsp; <a href="pa_tut_callback.html">next</a></font>
</body>
</html>