Skip to content

Platforms_Mac_OS_X

Phil Burk edited this page May 1, 2016 · 3 revisions

h1. Developing PortAudio on Mac

Create an XCode Command Line project.

Add Mac OS Frameworks

click on the project

click on "Build Phases"

click on "Link Binary with Libraries"

click on "+" then add

** AudioToolbox.framework ** AudioUnit.framework ** Carbon.framework ** CoreAudio.framework ** CoreServices.framework

Add PortAudio Source Code

right click on the project

select "Add files to {your project}"

navigate to the "portaudio/src/common" folder and "Add" it

repeat for "portaudio/src/hostapis/coreaudio"

repeat for "portaudio/src/os/unix"

repeat for "portaudio/includes"

Now use the same procedure to add an example program, eg. "portaudio/examples/paex_sine.c".

If you tried to build and run that program now you would probably get an error like: "Error: No default output device."

So we need to define some preprocessor variables:

click on projcet

click on "Build Settings"

scroll down to "Apple LLVM 7.1 Preprocessing"

Add PA_USE_COREAUDIO=1 to both the Debug and Release Preprocessor Macros

Clone this wiki locally