Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > irrKlang
Smoothly panning audio or 3D sound?

bulbousbeard
Registered User
Quote
2014-03-16 05:28:58

Hello,

First of all, I just want to tell you how awesome irrklang is. I had been using NAudio in my project, and irrklang is better in every way. It's wonderful.

I'm working on a small 2D program, and I have an object that perpetually moves from the left side of the screen to the right side of the screen.

I want to either make the sound pan from left to right or apply a doppler effect to it as it goes by.

The program has a static camera, so the listener position should never have to change.

For the panning, I'm using this code with irrklang:

float panningPosition = (2 * (-(float)objectXposition / (float)width)) + 1;

This gives me the panning effect, but it's not a smooth transition. The sound either plays in the left, center, or right speaker.

I'm looking for a smooth panning/doppler effect for the sound as the object goes by.

Can anyone help me with implementing this? Thanks a lot!


erik
Registered User
Quote
2014-03-17 08:31:54

Are you using DirectSound as outputput method? I think it has the smoothest pan, if you do it using 3d positions and not the setPan() functionality. Not sure if this isn't what you are doing anyway.. :)


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Int?rnational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact