playing sound in mac osx

T

tooru honda

Hi,

I am a newbie to mac and python.

Is there an easy way to play wav or mp3 sound file ? I used to use
winsound module before switching to mac, but that only works for windows.

Thanks

Tooru

P.S. I am using Mac OSX 10.4.8 and Python 2.5
 
D

Diez B. Roggisch

tooru said:
Hi,

I am a newbie to mac and python.

Is there an easy way to play wav or mp3 sound file ? I used to use
winsound module before switching to mac, but that only works for windows.

pygame might help.

Diez
 
D

Dennis Lee Bieber

Is there really no cross-platform audio capability in the standard library?
Probably not, as there isn't a common player method in the various
OS systems <G>... While there were a few OS specific modules (msvcrt) in
Python, they seem to be carry-overs from early days and wouldn't be made
"standard" if suggested now.


E:\>cd Music\Amarantine

E:\Music\Amarantine>python
ActivePython 2.4.3 Build 12 (ActiveState Software Inc.) based on
Python 2.4.3 (#69, Apr 11 2006, 15:32:42) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.

Is sufficient to start the defined "player" on WinXP (and block the
program while it plays, while the Windows particular os.startfile()
returns immediately, letting the player run stand-alone). But whether
other OSs will "start" a data file in a defined program is not something
one can rely upon.
--
Wulfraed Dennis Lee Bieber KD6MOG
(e-mail address removed) (e-mail address removed)
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: (e-mail address removed))
HTTP://www.bestiaria.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,815
Latest member
treekmostly22

Latest Threads

Top