[Openal] OpenAL .. Directional Effects .. Need Help

Cherukuri Jyothi Swaroop jyothiswaroop at gmail.com
Thu Jan 20 23:32:58 PST 2011


Hi Chris,

Thank you for the reply.

I tried with the settings mentioned by you but the still the audio is heard
in both the headphones.
I used Openal-soft-1.11.753. I have a doubt whether  I need to configure
anything for the  spatialization effects.
I configured it to wave drivers and  played the output wav file , in that as
well i got audio in both the headphones.

And one more thing I downloaded the windows library openal32.dll and wrote a
sample application,
In that the spatialisation effects are working. audio is coming from right
or left depending on the co ordiantes.
But the same code is giving audio in both the headphones in the library
compiled with Openal soft

Please suggest me what else do I need to make it work.

*Cheers
Jyothi Swaroop

"Never fear shadows. They simply mean there's a light shining somewhere
nearby."
*


On Fri, Jan 21, 2011 at 1:32 AM, Chris Robinson <chris.kcat at gmail.com>wrote:

> On Thursday, January 20, 2011 12:59:16 am Cherukuri Jyothi Swaroop wrote:
> > Hi
> >
> > I ported OpenAL to our platform and able to play the wav files.
> > I wrote a sample openal application and try to produce some sound
> effects.
> > Play back of audio is working but sound effects are not working.
> >
> > I am using jungle.wav which is mono channel sound wave file as input
>
> ...
>
> > I am expecting the sound to be played in the right headphone/speaker.
> >
> > But the sound is played in both the headphones.
>
> Hi.
>
> I think the cause is here:
>
>    SourcesPos[0] = 200;
>    SourcesPos[1] = 200;
>    SourcesPos[2] = 25;
>
> This sets the source to the right side, but also high up and a bit behind
> the
> listener. This causes the sound to pan towards the center since it's not
> strictly on the right side. It shouldn't be perfectly centered (it should
> be a
> bit less than half way to the right), but it does make OpenAL produce sound
> on
> the left speaker as well as the right. If you set that to:
>
>    SourcesPos[0] = 200;
>    SourcesPos[1] = 0;
>    SourcesPos[2] = 0;
>
> Does it play on the right side that way? If so, that's just how the panning
> algorithm works. The farther a source is from a strict right position, the
> more it pans towards the left so it can make a smooth transition as it
> circles
> around the listener.
>
>
> Also, on a side note:
>
>    alGenBuffers(NUM, Buffers);
>    Buffer[0]= alutCreateBufferFromFile("/Res/jungle.wav");
>
> This is causing a leak. alGenBuffers creates NUM buffer IDs and writes them
> to
> the Buffers array, but alutCreateBufferFromFile is creating another buffer
> ID
> and overwriting Buffers[0]. The Buffers[0] that alGenBuffers created is
> lost,
> replaced by the one alutCreateBufferFromFile created.
>
>
> Hope that helps. :)
> _______________________________________________
> Openal mailing list
> Openal at opensource.creative.com
> http://opensource.creative.com/mailman/listinfo/openal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://opensource.creative.com/pipermail/openal/attachments/20110121/0a986409/attachment.html


More information about the Openal mailing list