cinder/Cinder — pull request #432 by richardeakin (2014-05-23 07:18:05+00:00)
Title: Audio2

I think cinder's next audio api is ready to be merged to the dev branch. Anyone following the forums will know I've been doing rounds, refactoring the API, fixing bugs, but at this point I think it is a solid foundation and a worthy replacement for cinder's current audio functionality.

The docs are still a work in progress, they will be revisited before next release, but [here is a link](https://github.com/cinder/Cinder/blob/audio2/docs/doxygen/docsrc/audio/audio.dox) to where the current version lives.

There are a few contributions outside of the ci::audio namespace, namely:

- CinderAssert.h: provides some assertion macros that compile out in release builds, along with some other fancy features like user-defined handlers and breaking on assertion instead of aborting.
- CurrentFunction.h: cross-platform `__PRETTY__FUNCTION__`
- CinderMath.h: added `wrap()`, a fast function to wrap a floating point number between 0 and 1, `isPowerOfTwo()`, and some missing round functions for vs2012.
- CinderMsw.h - `makeComUnique()` (when do you want to share a COM object?), a couple other helpers that were required for audio i/o and resource handling on windows.

Xcode users note: after some discussion, warnings have been made equal across all platforms, including conversion from double to float (this was already the case on windows). As a result, there are a handful of harmless warnings that are currently emitted when building on Mac, though I didn't want to touch those files until after this branch is merged.