Follow us on...
Follow us on Twitter Follow us on Facebook
Register
Results 1 to 3 of 3
  1. #1
    afflictedd2 is offline Registered User
    Join Date
    Oct 2008
    Posts
    54
    Thanks
    5
    Thanked 0 Times in 0 Posts

    playing sound from command line

    Hi everyone,

    I need to play a sound from command line, but without actually opening itunes or any of the sort. Anyone know how to do this?

    Ted.

  2. #2
    artov is offline Registered User
    Join Date
    Mar 2005
    Posts
    363
    Thanks
    0
    Thanked 15 Times in 14 Posts
    Answer to the first part: "open" command handles most of audio files. I tried an .au file (from some Java program) and it played on QuickTime Player. A mp3 file was played on ITunes. But on both cases the file was played by the program.

  3. #3
    HomelyPoet is offline Registered User
    Join Date
    Nov 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    In Terminal:
    afplay "/path/to/music/file/with.suffix"

    Also, if you found the file in Spotlight~Finder, drag-and-drop into Terminal after typing "afplay "

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •