pombreda / pgreloaded

Automatically exported from code.google.com/p/pgreloaded
Other
0 stars 0 forks source link

Cannot get 3D sound to work. #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
I built an app that plays sounds and I have adjusted the listener to put 
somewhere away from the sound location of (0,0,0).  I continually update the 
listener position like this:
xp,yp,zp = self.alistener.position
self.alistener.position = (xp,yp+1000,zp)
self.asink.set_listener(self.alistener)

self.asink.process_source(self.asource)

What is the expected output? What do you see instead?
I expect the sound to attenuate as I move further away, but I don't get any 
change in the sound volume.

What version of the product are you using? On what operating system?
With which Python implementation?
Python 2.7 32-bit and the latest beta of pygame2 2.0.0
Windows 7 64-bit

Please provide any additional information below.
I wish there were more complete examples of how to use this lib.  I really 
loved pygame and the reason I using this is because I can choose the output 
device.  I have an app that needs this ability to use multiple sound devices.  

One question I had was do I need an OpenAL driver or is it built into the lib?  
I did go and download the OpenAL driver from CreativeLabs, but I don't see 
additional drivers in the list.  Here is a the list of drivers I do see:
xaudio2
directsound
winmm
disk
dummy

Original issue reported on code.google.com by demolish...@gmail.com on 7 Nov 2012 at 1:30

GoogleCodeExporter commented 9 years ago
Okay, this is my own dumb luck and not understanding.  In order to do 3D on a 
sound it must be MONO.  Stereo will get played as whatever balance there was 
when recording.  This is a big difference between pygame and pygame2.  

I was also having issues with sounds panning and found that each listener and 
sounds played must have a different contex or it will pan all sounds played on 
the same contex.

Original comment by demolish...@gmail.com on 7 Nov 2012 at 5:43

GoogleCodeExporter commented 9 years ago
As discussed off-list, the OpenAL/Audio wrappers are to be replaced in the 
foreseeable future with the implementation of http://code.google.com/p/py-al

I will close the issue for now.

Original comment by marcusvonappen@googlemail.com on 17 Nov 2012 at 8:22