Thread: C++ program to play sound on Mac OS X

  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    2

    C++ program to play sound on Mac OS X

    Hi, I am trying to write a simple program in C++ and I would really appreciate any help.

    Essentially I want the program to play a wav file, using whatever player the computer normally uses. The most promising information I've come across, however, involves PlaySound() and #include<windows.h>, which isn't very useful, as I'm using a Mac. Also I thought there might exist some kind of more general command that isn't platform specific.

    Any ideas?

  2. #2
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    http://www.libsdl.org/

    SDL is a multiplatform multimedia library,

    http://www.libsdl.org/download-1.2.php
    They have a mac OS X and classic binary for the library.

  3. #3
    Registered User
    Join Date
    Jun 2008
    Posts
    2
    Thanks, I'll have a mess around and see if I can make sense of it.

    A.

  4. #4
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    download the documentation as well to help you out.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C program to play a sound
    By cucamunga in forum Linux Programming
    Replies: 13
    Last Post: 08-27-2008, 09:30 AM
  2. Replies: 9
    Last Post: 11-11-2007, 02:31 PM
  3. Using variables in system()
    By Afro in forum C Programming
    Replies: 8
    Last Post: 07-03-2007, 12:27 PM
  4. fopen();
    By GanglyLamb in forum C Programming
    Replies: 8
    Last Post: 11-03-2002, 12:39 PM
  5. no program sound
    By Unregistered in forum Windows Programming
    Replies: 2
    Last Post: 07-18-2002, 07:24 AM

Tags for this Thread