PortAudio Tutorial |
[Skip this page if you are not using Windows]home | contents | previous | nextTo compile PortAudio for Windows, you can choose between two options. One implementation uses the DirectSound API. The other uses the Wave MultiMedia I/O API (MMIO).
Some advantages of using DirectSound are that DirectSound may have lower latency than MMIO, and supports effects processing plugins. But one disadvantage is that DirectSound is not installed on all PCs, and is not well supported under Windows NT. If you wish to compile using the MMIO interface, please refer to the MMIO implementation on the PortAudio Home Page for instructions. The API is the same either way so the rest of this tutorial applies to all implementations.
If you use the DirectSound implementation of PortAudio then you must have a recent copy of the free DirectX from Microsoft installed on your computer.
To compile an application with the PortAudio library add the following source files to your project:
Link with the following system libraries:pa_win_ds\dsound_wrapper.c pa_win_ds\pa_dsound.c pa_common\pa_lib.c pa_common\portaudio.h pa_common\pa_host.hYou may try compiling the "pa_tests\patest_saw.c" file first because it is the simplest.dsound.lib winmm.lib