开发者

positioning sound with pygame?

Is the开发者_高级运维re a way to do panning or 3d sound in Pygame? The only way I've found to control sound playback is to set the volume for both the left and right channels.


http://pysonic.sourceforge.net/

Try this out, it's a wrapper over the FMOD sound library, it won't disappoint :)


You are correct - Pygame itself doesn't have any high-level way to position sound other than manually adjusting channel volumes (and it looks like it only supports stereo).

The best way, to do 3D-audio, especially for games, is to use OpenAL. Unfortunately, there's no way to this in Pygame (note that there is an OpenAL library in "pgreloaded," the next version of Pygame). Pyglet, however, does use OpenAL. I've never tried mixing Pygame and pyglet, though - I wonder if it would work?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜