Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > irrKlang
Using doppler (c Vb.Net)

xemix
Registered User
Quote
2014-08-26 18:31:31

I have a problem to use the doppler.
Suppose I have two objects.
1) object1 stationary object emits a sound loop.
2) object2 in motion, the speed is in m/s

When object2 passing near object1 start effect.
If this is possible I would like to have a simple code example for reasoning (activate Doppler effect), I do not want a solution. Using c or Vb.Net
I have read the documentation but can not find any example.
Thank you.


niko
Moderator
Quote
2014-08-27 06:06:23

Hi
this works when
1) using DirectSound as audio driver (which is the default).
2) and specifying the Velocity property for an ISound.

If it is the listener which is moving, and not the sound, you need to specify the velocity of the listener when calling setListenerPosition().

Additionally, you have the SetDopplerEffectParameters() method, for influencing how the doppler effect is multiplied. (Doppler factor is a value between 0 and 10 which multiplies, distanceFactor is the number of meters in a vector uni)


xemix
Registered User
Quote
2014-08-27 16:31:11

Now I know how to do.
I had not considered SetListenerPosition (float, float, float, float, float, float, float, float, float, float, float, float) and the fact that the object1 is stationary.

Thanks for your help.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Intern?tional" (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