Author: Phil Burk
Description: 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.
Keywords: audio, tutorial, library, portable, open-source, DirectSound,sound, music, JSyn, synthesis,

# PortAudio Tutorial

## Compiling for Windows (WMME or DirectSound)

> To compile PortAudio for Windows, you can choose between two options. One implementation uses the DirectSound API. The other uses the Windows MultiMedia Extensions API (aka WMME or WAVE).

> Some advantages of using DirectSound are that DirectSound may have lower latency than WMME, 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. So WMME is the best choice for most projects.

> For either implementation add the following source files to your project:

> >     pa_common\pa_lib.c
> >     pa_common\portaudio.h
> >     pa_common\pa_host.h

> Link with the system library "winmm.lib". For Visual C++:
> 1. select "Settings..." from the "Project" menu,
> 2. select the project name in the tree on the left,
> 3. choose "All Configurations" in the popup menu above the tree,
> 4. select the "Link" tab,
> 5. enter "winmm.lib", without quotes, as the first item in the "Object/library modules:" field.
> WMME - To use the WMME implementation, add the following source files to your project:

> > `pa_win_wmme/pa_win_wmme.c`

> DirectSound - If you want to use the DirectSound implementation of PortAudio then you must have a recent copy of the free DirectX SDK for Developers from Microsoft installed on your computer. To compile an application add the following source files to your project:

> >     pa_win_ds\dsound_wrapper.c
> >     pa_win_ds\pa_dsound.c

> Link with the system library "dsound.lib" using the procedure described above for "winmm.lib".

> You might try compiling the "pa_tests\patest_saw.c" file first because it is the simplest.

home | contents | previous | next