To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

The primary repository for this project is hosted at https://github.com/sonic-visualiser/sv-dependency-builds .
This repository is a read-only copy which is updated automatically every hour.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / src / portaudio_20161030_catalina_patch / src / hostapi / asio / ASIO-README.txt @ 162:d43aab368df9

History | View | Annotate | Download (4.69 KB)

1
ASIO-README.txt
2

    
3
This document contains information to help you compile PortAudio with 
4
ASIO support. If you find any omissions or errors in this document 
5
please notify us on the PortAudio mailing list.
6

    
7
NOTE: The Macintosh sections of this document are provided for historical
8
reference. They refer to pre-OS X Macintosh. PortAudio no longer
9
supports pre-OS X Macintosh. Steinberg does not support ASIO on Mac OS X.
10

    
11

    
12
Building PortAudio with ASIO support
13
------------------------------------
14

    
15
To build PortAudio with ASIO support you need to compile and link with
16
pa_asio.c, and files from the ASIO SDK (see below), along with the common 
17
PortAudio files from src/common/ and platform specific files from 
18
src/os/win/ (for Win32).
19

    
20
If you are compiling with a non-Microsoft compiler on Windows, also 
21
compile and link with iasiothiscallresolver.cpp (see below for 
22
an explanation).
23

    
24
For some platforms (MingW, Cygwin/MingW), you may simply
25
be able to type:
26

    
27
./configure --with-host_os=mingw --with-winapi=asio [--with-asiodir=/usr/local/asiosdk2]
28
make
29

    
30
and life will be good. Make sure you update the above with the correct local
31
path to the ASIO SDK.
32

    
33

    
34
For Microsoft Visual C++ there is an build tutorial here:
35
http://www.portaudio.com/trac/wiki/TutorialDir/Compile/WindowsASIOMSVC
36

    
37

    
38

    
39
Obtaining the ASIO SDK
40
----------------------
41

    
42
In order to build PortAudio with ASIO support, you need to download 
43
the ASIO SDK (version 2.0 or later) from Steinberg. Steinberg makes the ASIO 
44
SDK available to anyone free of charge, however they do not permit its 
45
source code to be distributed.
46

    
47
NOTE: In some cases the ASIO SDK may require patching, see below 
48
for further details.
49

    
50
http://www.steinberg.net/en/company/developer.html
51

    
52
If the above link is broken search Google for:
53
"download steinberg ASIO SDK"
54

    
55

    
56

    
57
Building the ASIO SDK on Windows
58
--------------------------------
59

    
60
To build the ASIO SDK on Windows you need to compile and link with the 
61
following files from the ASIO SDK:
62

    
63
asio_sdk\common\asio.cpp
64
asio_sdk\host\asiodrivers.cpp
65
asio_sdk\host\pc\asiolist.cpp
66

    
67
You may also need to adjust your include paths to support inclusion of 
68
header files from the above directories.
69

    
70
The ASIO SDK depends on the following COM API functions: 
71
CoInitialize, CoUninitialize, CoCreateInstance, CLSIDFromString
72
For compilation with MinGW you will need to link with -lole32, for
73
Borland compilers link with Import32.lib.
74

    
75

    
76

    
77
Non-Microsoft (MSVC) Compilers on Windows including Borland and GCC
78
-------------------------------------------------------------------
79

    
80
Steinberg did not specify a calling convention in the IASIO interface 
81
definition. This causes the Microsoft compiler to use the proprietary 
82
thiscall convention which is not compatible with other compilers, such 
83
as compilers from Borland (BCC and C++Builder) and GNU (gcc). 
84
Steinberg's ASIO SDK will compile but crash on initialization if 
85
compiled with a non-Microsoft compiler on Windows.
86

    
87
PortAudio solves this problem using the iasiothiscallresolver library 
88
which is included in the distribution. When building ASIO support for
89
non-Microsoft compilers, be sure to compile and link with
90
iasiothiscallresolver.cpp. Note that iasiothiscallresolver includes
91
conditional directives which cause it to have no effect if it is
92
compiled with a Microsoft compiler, or on the Macintosh.
93

    
94
If you use configure and make (see above), this should be handled
95
automatically for you.
96

    
97
For further information about the IASIO thiscall problem see this page:
98
http://www.rossbencina.com/code/iasio-thiscall-resolver
99

    
100

    
101

    
102
Building the ASIO SDK on (Pre-OS X) Macintosh
103
---------------------------------------------
104

    
105
To build the ASIO SDK on Macintosh you need to compile and link with the 
106
following files from the ASIO SDK:
107

    
108
host/asiodrivers.cpp 
109
host/mac/asioshlib.cpp 
110
host/mac/codefragements.cpp
111

    
112
You may also need to adjust your include paths to support inclusion of 
113
header files from the above directories.
114

    
115

    
116

    
117
(Pre-OS X) Macintosh ASIO SDK Bug Patch
118
---------------------------------------
119

    
120
There is a bug in the ASIO SDK that causes the Macintosh version to 
121
often fail during initialization. Below is a patch that you can apply.
122

    
123
In codefragments.cpp replace getFrontProcessDirectory function with 
124
the following one (GetFrontProcess replaced by GetCurrentProcess).
125

    
126

    
127
bool CodeFragments::getFrontProcessDirectory(void *specs)
128
{
129
	FSSpec *fss = (FSSpec *)specs;
130
	ProcessInfoRec pif;
131
	ProcessSerialNumber psn;
132

    
133
	memset(&psn,0,(long)sizeof(ProcessSerialNumber));
134
	//  if(GetFrontProcess(&psn) == noErr)  // wrong !!!
135
	if(GetCurrentProcess(&psn) == noErr)  // correct !!!
136
	{
137
		pif.processName = 0;
138
		pif.processAppSpec = fss;
139
		pif.processInfoLength = sizeof(ProcessInfoRec);
140
		if(GetProcessInformation(&psn, &pif) == noErr)
141
				return true;
142
	}
143
	return false;
144
}
145

    
146

    
147
###