gearmulator

Emulation of classic VA synths of the late 90s/2000s that are based on Motorola 56300 family DSPs
Log | Files | Refs | Submodules | README | LICENSE

compile_windows_asio_msvc.dox (4963B)


      1 /** @page compile_windows_asio_msvc Building Portaudio for Windows with ASIO support using MSVC
      2 @ingroup tutorial
      3 
      4 @section comp_win_asiomsvc1 Portaudio Windows ASIO with MSVC
      5 
      6 This tutorial describes how to build PortAudio with ASIO support using MSVC *from scratch*, without an existing Visual Studio project. For instructions for building PortAudio (including ASIO support) using the bundled Visual Studio project file see the compiling instructions for \ref compile_windows.
      7 
      8 ASIO is a low latency audio API from Steinberg. To compile an ASIO
      9 application, you must first download the ASIO SDK from Steinberg. You also
     10 need to obtain ASIO drivers for your audio device. Download the ASIO SDK from Steinberg at http://www.steinberg.net/en/company/developer.html . The SDK is free but you will need to set up a developer account with Steinberg.
     11 
     12 This tutorial assumes that you have 3 directories set up at the same level (side by side), one containing PortAudio, one containing the ASIO SDK and one containing your Visual Studio project:
     13 
     14 @code
     15 /ASIOSDK2 
     16 /portaudio
     17 /DirContainingYourVisualStudioProject  (should directly contain the .sln, .vcproj or .vcprojx etc.)
     18 @endcode
     19 
     20 First, make sure that the Steinberg SDK and the portaudio files are "side by side" in the same directory.
     21 
     22 Open Microsoft Visual C++ and create a new blank Console exe Project/Workspace in that same directory.
     23 
     24 For example, the paths for all three groups might read like this:
     25 
     26 @code
     27 C:\Program Files\Microsoft Visual Studio\VC98\My Projects\ASIOSDK2
     28 C:\Program Files\Microsoft Visual Studio\VC98\My Projects\portaudio
     29 C:\Program Files\Microsoft Visual Studio\VC98\My Projects\Sawtooth
     30 @endcode
     31 
     32 
     33 Next, add the following Steinberg ASIO SDK files to the project Source Files: 
     34 
     35 @code
     36 asio.cpp                        (ASIOSDK2\common)
     37 asiodrivers.cpp                 (ASIOSDK2\host)
     38 asiolist.cpp                    (ASIOSDK2\host\pc)
     39 @endcode
     40 
     41 
     42 Then, add the following PortAudio files to the project Source Files:
     43 
     44 @code
     45 pa_asio.cpp                     (portaudio\src\hostapi\asio)
     46 pa_allocation.c                 (portaudio\src\common)
     47 pa_converters.c                 (portaudio\src\common)
     48 pa_cpuload.c                    (portaudio\src\common)
     49 pa_dither.c                     (portaudio\src\common)
     50 pa_front.c                      (portaudio\src\common)
     51 pa_process.c                    (portaudio\src\common)
     52 pa_ringbuffer.c                 (portaudio\src\common)
     53 pa_stream.c                     (portaudio\src\common)
     54 pa_trace.c                      (portaudio\src\common)
     55 pa_win_hostapis.c               (portaudio\src\os\win)
     56 pa_win_util.c                   (portaudio\src\os\win)
     57 pa_win_coinitialize.c           (portaudio\src\os\win)
     58 pa_win_waveformat.c             (portaudio\src\os\win)
     59 pa_x86_plain_converters.c       (portaudio\src\os\win)
     60 paex_saw.c                      (portaudio\examples)  (Or another file containing main() 
     61                                                       for the console exe to be built.)
     62 @endcode
     63 
     64 
     65 Although not strictly necessary, you may also want to add the following files to the project Header Files:
     66 
     67 @code
     68 portaudio.h                     (portaudio\include)
     69 pa_asio.h                       (portaudio\include)
     70 @endcode
     71 
     72 These header files define the interfaces to the PortAudio API.
     73 
     74 
     75 Next, go to Project Settings > All Configurations > C/C++ > Preprocessor > Preprocessor Definitions and add
     76 PA_USE_ASIO=1 to any entries that might be there.
     77 
     78 eg: WIN32;_CONSOLE;_MBCS   changes to    WIN32;_CONSOLE,_MBCS;PA_USE_ASIO=1
     79 
     80 Then, on the same Project Settings tab, go down to Additional Include Directories (in VS2010 you'll find this setting under C/C++ > General) and enter the following relative include paths:
     81 
     82 @code
     83 ..\portaudio\include;..\portaudio\src\common;..\portaudio\src\os\win;..\asiosdk2\common;..\asiosdk2\host;..\asiosdk2\host\pc
     84 @endcode
     85 
     86 You'll need to make sure the relative paths are correct for the particular directory layout you're using. The above should work fine if you use the side-by-side layout we recommended earlier.
     87 
     88 Some source code in the ASIO SDK is not compatible with the Win32 API UNICODE mode (The ASIO SDK expects the non-Unicode Win32 API). Therefore you need to make sure your project is set to not use Unicode. You do this by setting the project Character Set to "Use Multi-Byte Character Set" (NOT "Use Unicode Character Set"). In VS2010 the Character Set option can be found at Configuration Properties > General > Character Set. (An alternative to setting the project to non-Unicode is to patch asiolist.cpp to work when UNICODE is defined: put #undef UNICODE at the top of the file before windows.h is included.)
     89 
     90 You should now be able to build any of the test executables in the portaudio\\examples directory.
     91 We suggest that you start with paex_saw.c because it's one of the simplest example files.
     92 
     93 --- Chris Share, Tom McCandless, Ross Bencina
     94 
     95 Back to the Tutorial: \ref tutorial_start
     96 
     97 */