openframeworks/openFrameworks — pull request #2078 by admsyn (2013-06-02 18:07:59+00:00)
Title: add setter for OpenAL's distance model in ofxOpenALSoundPlayer

This adds a simple feature to the ofxOpenALSoundPlayer on ios, requested in issue #1322 and added to the 0.8.0 milestone list.

This code just adds a wrapper for the `alDistanceModel` setter. In addition, there's a little note in the header explaining what the "distance model" means, what the default one is (as per the OpenAL spec), and calls attention to the AL_LINEAR_DISTANCE_CLAMPED which is *not* the default, but is perhaps more intuitive (again, see #1322).

Also, I've added a minimal demonstration of the new functionality to the OpenAL example, similar to @armadillu's original demonstration. Let me know if you'd like that to be a separate PR.

I'm against making it the default, as suggested, but I *do* personally think that AL_LINEAR_DISTANCE_CLAMPED acts more like what I'd expect.

Summoning @ofTheo and @julapy