playing sound in mac osx

Discussion in 'Python' started by tooru honda, May 1, 2007.

  1. tooru honda

    tooru honda Guest

    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
     
    tooru honda, May 1, 2007
    #1
    1. Advertising

  2. tooru honda schrieb:
    > 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
     
    Diez B. Roggisch, May 1, 2007
    #2
    1. Advertising

  3. tooru honda

    kaens Guest

    Is there really no cross-platform audio capability in the standard library?

    On 5/1/07, Diez B. Roggisch <> wrote:
    > tooru honda schrieb:
    > > 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
    > --
    > http://mail.python.org/mailman/listinfo/python-list
    >
     
    kaens, May 1, 2007
    #3
  4. On Tue, 1 May 2007 05:01:42 -0400, kaens <>
    declaimed the following in comp.lang.python:

    > 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.
    >>> import os
    >>> os.system("02-amarantine.mp3")



    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

    HTTP://wlfraed.home.netcom.com/
    (Bestiaria Support Staff: )
    HTTP://www.bestiaria.com/
     
    Dennis Lee Bieber, May 1, 2007
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ron Clarke

    Sound lost when playing AVI files

    Ron Clarke, Feb 24, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    362
    Ron Clarke
    Feb 24, 2004
  2. Ike

    playing a sound

    Ike, Feb 26, 2004, in forum: Java
    Replies:
    6
    Views:
    454
    Erwin Moller
    Feb 26, 2004
  3. marko

    re-playing sound in J2ME

    marko, Dec 14, 2004, in forum: Java
    Replies:
    3
    Views:
    11,643
    Darryl L. Pierce
    Dec 15, 2004
  4. Replies:
    0
    Views:
    564
  5. Christopher Mahan
    Replies:
    1
    Views:
    473
    Simon Burton
    Nov 16, 2003
Loading...

Share This Page