python - Pygame 支持哪些格式来播放声音?

标签 python pygame

这些模块支持哪些声音格式:

pygame.mixer.sound 

或:

pygame.mixer.music 

最佳答案

来自 pygame documentation:

The Sound can be loaded from an OGG audio file or from an uncompressed WAV.

至于Music,它似乎支持几种不同的格式,包括MP3(有限)、OGG、XM & MOD。参见 Documentation for music (以及该页面上的评论)。

关于python - Pygame 支持哪些格式来播放声音?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12123731/

相关文章:

python - Python 中列表中 += 的含义

python - Python中的Dict.get是用来比较字典中的键吗?

python - 如何在 3.7.1 上导入 pygame?

python - 检查一个点是否与pygame中的表面(像素完美)碰撞

python - 列表索引必须是整数,而不是列表 - 在 python 中使用 Dict

python - 在 python 中创建一个简单的加密代码并遇到字典/逻辑问题

python - 为什么正则表达式在 Python 2.7 中匹配一个额外的空格?

python - Pygame 塔防游戏,寻找目标的问题

python - 为什么 pygame 中的 collide_mask 比 collide_rect 慢很多?

python - 我可以在模块中使用程序中创建的对象吗?