Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

melonjelly

3D Audio ???

This topic is 5800 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! I hope anybody could help me. I have a weird problem going on with 3DSound using Direct Audio 8.1. Either my 3D soundbuffers don''t move as expected or my 3D listener does not change its position. I have ONE global 3D listener object managed by my audio-engine which I get from the primary sound buffer like this: DSBUFFERDESC dsbd; LPDIRECTSOUNDBUFFER lpdsbPrimary; ZeroMemory(&dsbd, sizeof(DSBUFFERDESC)); dsbd.dwSize = sizeof(DSBUFFERDESC); dsbd.dwFlags = DSBCAPS_CTRL3D | DSBCAPS_PRIMARYBUFFER; if SUCCEEDED(directSound->CreateSoundBuffer(&dsbd, &lpdsbPrimary, NULL)) { // Get listener interface. if FAILED(lpdsbPrimary->QueryInterface(IID_IDirectSound3DListener8,(void**)&listener3D)) { cerr << "Failed to get 3D audio listener in audio path." << endl; lpdsbPrimary->Release(); } } everything works fine here and I don''t get any errors. BUT whenever I try to change the position of my listender nothing happens!!! i.e. listener3D->SetPosition(10.0f, 0.0f, 10.0f, DS3D_IMMEDIATE); the listener seems to be stuck to my gameworld origin (because the closer I am to 0/0 the louder the sound - which plays on a 3D audio-path - gets) Does anybody have an idea what''s going on here? Thanks in advance!

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!