having trouble with audio 3d

I’ve been trying to put positional sound in my scene, but I hear no positional effects, just normal constant sound no matter how far away the camera is from the sound’s position.

I create the audio manager thus:
mAudioManager = AudioManager::create_AudioManager();

set up the AsyncTaskManager and its GenericAsyncTask to call ( to do the mAudioManager->update )

Load a sound file and set position (not moving):
PT(AudioSound) sound = mAudioManager->get_sound(file,true);
sound->set_3d_attributes(pos.get_x(),pos.get_y(),pos.get_z(),0.,0.,0.);
sound->play();

I have a Class that handles the camera movements using keyboard and mouse events and tasks, and when ever I update the position or orientation of the camera I call my function updateListener() that gets camera pos, front and up vectors and calls
mAudioManager->audio_3d_set_listener_attributes()

Am I missing anything ?

Thanks for any help

tim

Seems like this always happens to me… ha
I tried a different sound file, the one used in PandaAudioTut named Step.wav and everything worked.
What I was using before was musicbox.mp3 from the samples/Music-Box, that didn’t produce a 3D effect;
maybe something about how they are recorded…

Well, maybe this post might help someone that runs into the same problem, seems the 3D effect can be dependent on your sound file…

Make sure your sound file is mono, not stereo.

Thanks for the reply.
yeah, that’s what it looks like is happening,
we need to use mono sound for positional.
Good catch :slight_smile:

Now my scene has a fountain with rotating sprite particles “bubbling” out of the top, and the sounds of water splashing at the fountain.

tim