| 1 |
Hello |
| 2 |
|
| 3 |
This is a small list of steps in order to build portaudio |
| 4 |
(Currently v19-devel) into a VS2005 DLL and lib file. |
| 5 |
This DLL contains all 5 current Win32 PA APIS (MME/DS/ASIO/WASAPI/WDMKS) |
| 6 |
|
| 7 |
1)Copy the source dirs that comes with the ASIO SDK inside src\hostapi\asio\ASIOSDK |
| 8 |
so you should now have example: |
| 9 |
|
| 10 |
portaudio19svn\src\hostapi\asio\ASIOSDK\common |
| 11 |
portaudio19svn\src\hostapi\asio\ASIOSDK\host |
| 12 |
portaudio19svn\src\hostapi\asio\ASIOSDK\host\sample |
| 13 |
portaudio19svn\src\hostapi\asio\ASIOSDK\host\pc |
| 14 |
portaudio19svn\src\hostapi\asio\ASIOSDK\host\mac (not needed) |
| 15 |
|
| 16 |
You dont need "driver" |
| 17 |
|
| 18 |
To build without ASIO (or another Host API) see the "Building without ASIO support" section below. |
| 19 |
|
| 20 |
2) |
| 21 |
*If you have Visual Studio 6.0*, please make sure you have it updated with the latest (and final) |
| 22 |
microsoft libraries for it, namely: |
| 23 |
|
| 24 |
Service pack 5: |
| 25 |
Latest known URL: |
| 26 |
http://msdn2.microsoft.com/en-us/vstudio/aa718363.aspx |
| 27 |
Yes there EXISTS a service pack 6 , but the processor pack (below) isn't compatible with it. |
| 28 |
|
| 29 |
Processor Pack(only works with above SP5) |
| 30 |
Latest known URL: |
| 31 |
http://msdn2.microsoft.com/en-us/vstudio/Aa718349.aspx |
| 32 |
This isn't absolutely required for portaudio, but if you plan on using SSE intrinsics and similar things. |
| 33 |
Up to you to decide upon Service pack 5 or 6 depending on your need for intrinsics. |
| 34 |
|
| 35 |
Platform SDK (Feb 2003) : |
| 36 |
Latest known URL: |
| 37 |
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm |
| 38 |
(This will allow your code base to be x64 friendly, with correct defines |
| 39 |
for LONG_PTR and such) |
| 40 |
NOTE A) Yes you have to use IE activex scripts to install that - wont work in Firefox, you |
| 41 |
may have to temporarily change tyour default browser(aint life unfair) |
| 42 |
NOTE B) Dont forget to hit "Register PSDK Directories with Visual Studio". |
| 43 |
you can make sure its right in VC6 if you open tools/options/directories/include files and you see SDK 2003 as the FIRST entry |
| 44 |
(it must be the same for libs) |
| 45 |
|
| 46 |
DirectX 9.0 SDK Update - (Summer 2003) |
| 47 |
Latest known URL: |
| 48 |
http://www.microsoft.com/downloads/details.aspx?familyid=9216652f-51e0-402e-b7b5-feb68d00f298&displaylang=en |
| 49 |
Again register the links in VC6, and check inside vc6 if headers are in second place right after SDk 2003 |
| 50 |
|
| 51 |
*If you have 7.0(VC.NET/2001) or 7.1(VC.2003) * |
| 52 |
then I suggest you open portaudio.dsp (and convert if needed) |
| 53 |
|
| 54 |
*If you have Visual Studio 2005 * (or later), I suggest you open the portaudio.sln file |
| 55 |
which contains 2 projects (portaudio & portaudio_static) each with 6 configurations: Win32/x64 in both Debug, Release and ReleaseMinDependency, |
| 56 |
last of which removes dependency of all but basic OS system DLLs. |
| 57 |
|
| 58 |
hit compile and hope for the best. |
| 59 |
|
| 60 |
3)Now in any project, in which you require portaudio, |
| 61 |
you can just link with portaudio_x86.lib, (or _x64) and of course include the |
| 62 |
relevant headers |
| 63 |
(portaudio.h, and/or pa_asio.h , pa_x86_plain_converters.h) See (*) |
| 64 |
|
| 65 |
4) Your new exe should now use portaudio_xXX.dll. |
| 66 |
|
| 67 |
|
| 68 |
Have fun! |
| 69 |
|
| 70 |
(*): you may want to add/remove some DLL entry points. |
| 71 |
Right now those 6 entries are _not_ from portaudio.h |
| 72 |
|
| 73 |
(from portaudio.def) |
| 74 |
(...) |
| 75 |
PaAsio_GetAvailableLatencyValues @50 |
| 76 |
PaAsio_ShowControlPanel @51 |
| 77 |
PaUtil_InitializeX86PlainConverters @52 |
| 78 |
PaAsio_GetInputChannelName @53 |
| 79 |
PaAsio_GetOutputChannelName @54 |
| 80 |
PaUtil_SetLogPrintFunction @55 |
| 81 |
|
| 82 |
|
| 83 |
*** Building without ASIO support *** |
| 84 |
|
| 85 |
To build PortAudio without ASIO support you need to: |
| 86 |
A. Make sure your project doesn't try to build any ASIO SDK files. |
| 87 |
If you're using one of the shipped projects, remove the ASIO related files |
| 88 |
from the project. |
| 89 |
|
| 90 |
B. Make sure your project doesn't try to build the PortAudio ASIO |
| 91 |
implementation files: |
| 92 |
src/hostapi/pa_asio.cpp |
| 93 |
src/hostapi/iasiothiscallresolver.cpp |
| 94 |
If you're using one of the shipped projects remove them from the project. |
| 95 |
|
| 96 |
C. Set the PA_USE_ASIO preprocessor symbol to zero (i.e. PA_USE_ASIO=0) in the project properties. |
| 97 |
In VS2005 this can be added under |
| 98 |
Project Properties > Configuration Properties > C/C++ > Preprocessor > Preprocessor Definitions |
| 99 |
|
| 100 |
Setting PA_USE_ASIO=0 stops src/os/win/pa_win_hostapis.c |
| 101 |
from trying to initialize the PA ASIO implementation. |
| 102 |
|
| 103 |
D. Remove PaAsio_* entry points from portaudio.def, or comment them out with ; |
| 104 |
|
| 105 |
|
| 106 |
A similar procedure can be used to omit any of the other host APIs from the |
| 107 |
build. The relevant preprocessor symbols used by pa_win_hostapis.c are: |
| 108 |
PA_USE_WMME, PA_USE_DSOUND, PA_USE_ASIO, PA_USE_WASAPI and PA_USE_WDMKS |
| 109 |
|
| 110 |
----- |
| 111 |
David Viens, [email protected] |
| 112 |
Robert Bielik, [email protected] |