how to play a WAV file from OS X shell ???

Discussion in 'macOS' started by callagga, Jun 2, 2007.

  1. callagga macrumors member

    Joined:
    Mar 2, 2007
    #1
    Hi,

    Can anyone tell me the easiest way to play a WAV file (a short wave file) from the OS X shell / command line (.e.g in terminal).

    Thanks
    Greg
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    Well I've never used the shell to open a music file, but I have used it to open text files. You just have to use the path to the application followed by the path to the file you want opened, but this does require for the application to open, which may not be what you want. Maybe someone else will have a simpler solution.
     
  3. callagga thread starter macrumors member

    Joined:
    Mar 2, 2007
    #3
    I've gone with for the moment:

    * downloading/installing "play sound" &

    * using applescript to trigger this
    Code:
    tell application "Play Sound" to play ("Macintosh HD:Comedy Whistle.aif" as alias)
     

Share This Page