Sound positioning with pygame?

Is there a way for pinning or 3D audio in Pygame? The only way I have found to control audio playback is to set the volume for both the left and right channels.

+2


source to share


3 answers


You're right. Pygame itself doesn't have any high level of sound positioning other than manually adjusting channel volumes (and it looks like it only supports stereo).



The best way to make 3D audio, especially for games, is to use OpenAL . Unfortunately, there is no way in Pygame (note that the OpenAL library has " pgreloaded ," the next version of Pygame ". Pyglet however uses OpenAL . I have never tried mixing Pygame and pyglet though ... I wonder if that would work?

+1


source


http://pysonic.sourceforge.net/



Try this, wrapper over FMOD sound library, it won't disappoint :)

0


source


I think setting a separate channel volume is the only way. Pygame doesn't seem to have a clue about world space or positioning for sounds.

0


source







All Articles