Has anyone been using 3d audio with great success?
When I was using 1.4.2 my 3d audio worked fine, but since I switched to 1.5.2., I am having some problems.
For one thing, I get this error:
:audio(warning): stereo sound /c/Panda3D-1.5.2/Projects/Sound/001_air.MP3 will not be spatialized
:audio(warning): stereo sound /c/Panda3D-1.5.2/Projects/Sound/002_cam.MP3 will not be spatialized
:audio(warning): stereo sound /c/Panda3D-1.5.2/Projects/Sound/004_beat.MP3 will not be spatialized
and the quality of the first sound has diminished.
Secondly, after I switched to 1.5.2, I added two other sounds and attatched them to objects, but I only hear a very faint, strange choppy noise when the camera gets close to the objects.
I will be thankful for any input on these issues.
Here is part of my code:
################################################################
""" AUDIO """
################################################################
soundEffectsMgr = base.sfxManagerList[0]
self.sound01 = Audio3DManager.Audio3DManager(base.sfxManagerList[0], self.Model1)
self.camMove = Audio3DManager.Audio3DManager(base.sfxManagerList[0], self.camera1)
self.sound02 = Audio3DManager.Audio3DManager(base.sfxManagerList[0], self.Model1)
self.sound03 = Audio3DManager.Audio3DManager(base.sfxManagerList[0], self.Model5)
self.sound04 = Audio3DManager.Audio3DManager(base.sfxManagerList[0], self.grassy1)
self.sound05 = Audio3DManager.Audio3DManager(base.sfxManagerList[0], self.pondAni)
# Dummy
self.sfxDummy = render.attachNewNode("linkSFX")
# Voice
self.sfx00 = self.sound01.loadSfx('Sound/001_air.MP3')
self.sound01.attachSoundToObject(self.sfx00, self.Model1)
self.sfx00.setLoop(0)
# Effects
# camera
self.sfx01 = self.camMove.loadSfx('Sound/002_cam.MP3')
self.camMove.attachSoundToObject(self.sfx01, self.my_camera3)
self.sfx01.setLoop(0)
# knock
self.sfx02 = self.sound02.loadSfx('Sound/003_bump.MP3')
self.sound02.attachSoundToObject(self.sfx02, self.Model1)
self.sfx02.setLoop(0)
# heartbeat
self.sfx03 = self.sound03.loadSfx('Sound/004_beat.MP3')
self.sound03.attachSoundToObject(self.sfx03, self.Model5)
self.sfx03.setLoop(0)
# russtle
self.sfx04 = self.sound04.loadSfx('Sound/005_rust.MP3')
self.sound04.attachSoundToObject(self.sfx04, self.grassy1)
self.sfx04.setLoop(0)
#self.sfx04.play()
# water
self.sfx05 = self.sound05.loadSfx('Sound/006_lake.MP3')
self.sound05.attachSoundToObject(self.sfx05, self.pondAni)
self.sfx05.setLoop(0)
#self.sfx05.play()
# Adjust the velocity of moving objects automatically
## base.cTrav = CollisionTraverser()
self.sound01.setSoundVelocityAuto(self.sfx00)
self.sound01.setListenerVelocityAuto()
self.camMove.setSoundVelocityAuto(self.sfx01)
self.camMove.setListenerVelocityAuto()
self.sound02.setSoundVelocityAuto(self.sfx02)
self.sound02.setListenerVelocityAuto()
self.sound03.setSoundVelocityAuto(self.sfx03)
self.sound03.setListenerVelocityAuto()
self.sound04.setSoundVelocityAuto(self.sfx04)
self.sound04.setListenerVelocityAuto()
self.sound05.setSoundVelocityAuto(self.sfx05)
self.sound05.setListenerVelocityAuto()
# Enable Audio
base.enableAllAudio()
# loop sounds
self.sfx04.setLoop(1)
self.sfx04.play()
self.sfx05.setLoop(1)
self.sfx05.play()
Shouldn’t this work properly?