跨平台音频播放在Python [英] Cross-platform Audio Playback in Python

查看:208
本文介绍了跨平台音频播放在Python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有音频播放一个跨平台的Python库可用?该操作系统我瞄准是(按重要性排列)的Windows,Linux和Mac OSX。这需要得到支持的文件格式为(按重要性排列)MP3,OGG,WAV和FLAC。难道这样的事情存在吗?

Is there a cross-platform Python library for audio playback available? The operating systems I am targeting are (in order of importance) Windows, Linux, and Mac OSX. The file formats which need to be supported are (in order of importance) MP3, OGG, WAV, and FLAC. Does something like this exist?

我已经尝试了几个Python库可用,如小吃,PyMedia,pygame的,等我不能让PyMedia编译,小吃不能播放音频和pygame的也不会播放音频两种。我在Linux上:Ubuntu 9.10的。

I have tried a few of the Python libraries available such as Snack, PyMedia, PyGame, etc. I couldn't get PyMedia to compile, Snack wouldn't play audio, and PyGame wouldn't play audio either. I'm on Linux: Ubuntu 9.10.

推荐答案

的GStreamer 是多平台的。它可以运行在Linux,PPC,ARM,上的Solaris x86和SPARC,MacOSX上,微软的Windows,IBM OS / 400和Symbian OS。

gstreamer is multiplatform. It runs on Linux, PPC, ARM, Solaris on x86 and SPARC, MacOSX, Microsoft Windows, IBM OS/400 and Symbian OS.

这篇关于跨平台音频播放在Python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆