sound command in Visual C++

This is a discussion on sound command in Visual C++ within the C++ Programming forums, part of the General Programming Boards category; Hello everyone, would anybody know the syntax for the sound command in Visual C++ and which header files to include? ...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    5

    sound command in Visual C++

    Hello everyone,

    would anybody know the syntax for the sound command in
    Visual C++ and which header files to include?

    Thanx

  2. #2
    V
    Guest
    Well, this depends on what you want to do.

    If you want a simple way to play a WAV file (it should be a WAV of < 1-2 MB, because this command waits until it can load the whole file into memory) just use the WinAPI PlaySound().

    I think this is defined in mmsystem.h

    For some info on parameters, and alternatives to this (somewhat primitive but functional) way of playing WAVs, check out:

    http://www.borg.com/~jglatt/tech/highaud.htm

    This guy has a lot of useful info on the various ways to do sound and music in Windows.

  3. #3
    Registered User
    Join Date
    Sep 2001
    Posts
    5
    thanks, but actually I just wanna use the sound where it plays a frequency through the pc speaker, any ideas?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 04:45 PM
  2. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  3. load gif into program
    By willc0de4food in forum Windows Programming
    Replies: 14
    Last Post: 01-11-2006, 09:43 AM
  4. Errors with including winsock 2 lib
    By gamingdl'er in forum C++ Programming
    Replies: 3
    Last Post: 12-05-2005, 07:13 PM
  5. Learning OpenGL
    By HQSneaker in forum C++ Programming
    Replies: 7
    Last Post: 08-06-2004, 08:57 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21