Direct Sound - 3D Positional Audio

Started by
2 comments, last by Nik02 17 years, 1 month ago
Hi, I'm working on some positional audio code. I have a sound source that can move around and attenuates it's volume reletive to its distance from the listener, however i have some questions. 1. Is it possible to change the listener position, or do all sound sources have to be set reletive to the position of the listener (ie if the listener moves left one unit, all sources have to instead be set to move right one unit)? 2. Is there a good tutorial on the internet on implimenting effects such as echoing?
Advertisement
Just a quick response to your questions:

Try FMOD if you dont actually want to implement yourself :) This could be the crappest answer or the best thing you can discover hehe
unfortunatley this coursework requires using DirectAudio, and from what i understand of FMOD it's an audio API. ie no dice :( which is a shame, as i've heard it's pretty good.
Quote:Original post by Winegums
Hi, I'm working on some positional audio code. I have a sound source that can move around and attenuates it's volume reletive to its distance from the listener, however i have some questions.

1. Is it possible to change the listener position, or do all sound sources have to be set reletive to the position of the listener (ie if the listener moves left one unit, all sources have to instead be set to move right one unit)?

2. Is there a good tutorial on the internet on implimenting effects such as echoing?


1: Yes, see IDirectSound3DListener8::SetPosition/SetOrientation/SetVelocity documentation on the SDK.

2: I don't know about tutorials, but you can use effects packaged as DirectX Media Objects (DMOs) with the sound buffer interfaces. DirectX comes with several such effects (including a simple echo) built-in, but if the default effect set is too limited for you, it is relatively easy to develop your own DMO classes by using C++. Again, see the SDK for more information.

Niko Suni

This topic is closed to new replies.

Advertisement