[openal] Trying to implement a linear 1D (left/right) audio balance
flibitijibibo at flibitijibibo.com
Sun Apr 20 20:52:45 EDT 2014
In FNA we do something like this, but it's probably not ideal (if not
I know for sure that this doesn't provide hard panning, but you probably
didn't _really_ want to do hard pans anyway. We do that work to keep
things at the 1.0f distance, but if attenuation isn't required for your
project, you can turn that off and possibly save some time/effort:
On 04/20/2014 08:44 PM, Villermen wrote:
> Hey there,
> After not being able to figure this one out myself I've posted my
> question on the OpenTK forums and StackOverflow, where I was suggested
> by the OpenTK dev to ask you about it =)
> Basically I'd like to have a balance value of -1f (left channel only)
> to 1f (right channel only) be converted into a position for an OpenAL
> source where it will act as such:
> When having 0f (default value) as balance value both sides (left/right
> ear) should be at 100% gain.
> When 1f 100% for the right ear and 0% for the left ear and the
> opposite for -1f.
> They should attenuate in a linear way.
> For what I've tried so far please read my post on StackOverflow
> I'm working with the OpenTK library but I am pretty sure I can convert
> any OpenAL related answer to it, just as long as I can understand it
> in general.
> I would really like to know if and how this is possible, and any
> thoughts on this are welcome!
> openal mailing list
> openal at openal.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the openal