Archived

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

DXSound - 3D problem (again)

This topic is 5584 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