README.md

Cinder-PortAudio

PortAudio audio backend for cinder.

Supported Platforms

Initial development was done on Windows 10 Desktop, with a focus on enabling the ASIO backend, with included VS 2015 project files. @PetrosKataras added CMake support, which can be used on most other platforms (Linux, Mac OS X, etc).

Installation

You can use TinderBox to create a startup project. Clone this repo into your cinder/blocks folder and select the template "PortAudio: Sinewave". Note that the cinderblock.xml is setup to create a project with ASIO support, due to Steinberg's licensing you'll need to install the ASIO SDK following the instructions below.

Usage

To use PortAudio as the master audio::Context, add the following include:

#include "cinder/audio/ContextPortAudio.h"

and then make the following call before any other audio calls:

audio::ContextPortAudio::setAsMaster();

After that, you can use audio::master() like you usually would with cinder's built in audio::Context implementations, and you can query which devices are available with the usual audio::Device::printDevicesToString().

Also see the PortAudioBasic sample for how to get up and running. It has two sets of configurations, one with ASIO support and one without (Debug_NoAsio and Release_NoAsio).

Enabling Windows ASIO backend

For ASIO support, download ASIO Sdk from the Steinberg website here, unzip and move to a folder at lib/ASIOSDK.

Then make sure that the following preprocessor macro is defined in our project:

Enable Unicode Character Set

Most cinder projects are build with Unicode Character Set (Configuration Properties -> General -> Character Set) and to make ASIO compatible with this, you need to add the following line to the top of lib/ASIOSDK/host/pc/asiolist.cpp, directly above the <#include "windows.h>`: