TPU ChatChat on IRC
Internet Relay Chat?
Java Applet client
Who's on IRC?
How to play wave files using C++??
Posted by RedX [send private reply] at March 25, 2002, 12:36:39 PM Simple: write the code to load a .wav-file, then write the code to use a sound card followed by writting the code to have a wav-file played on the sound card. Which you don't want to do, since this is time-consuming and very difficult to do unless you only want to use the program on one particular PC.
OR you could use one of the standard APIs to load and play the wav. (DirectX for example) Which one depends on what OS you target.
Posted by AREM [send private reply] at March 25, 2002, 08:19:12 PM One API call that will do it is PlaySound. To use this API you need mmsystem.h included and you need to link winmm.lib to the project. If you use VC++ this can be done by clicking Project and Settings from the menu bar.
Posted by Psion [send private reply] at March 25, 2002, 09:26:38 PM It's interesting that you assume he is writing this code for Windows.
Posted by realnewbie [send private reply] at March 26, 2002, 07:49:43 AM Thnks for all the help!!
actually i'm creating a game! using C++ (Win32 App)
but i dun know the codings on how to load the sounds??
like when i press space bar, a bullet will come out but with the sound!!
Posted by realnewbie [send private reply] at March 26, 2002, 07:55:51 AM there are certain codings on loading sounds..but i have no ideal..
Posted by Psion [send private reply] at March 26, 2002, 08:01:05 AM realnewbie, did you see that AREM told you about the PlaySound function? If you don't know how to look up help on a function, then you should learn now.
Posted by realnewbie [send private reply] at March 26, 2002, 08:26:29 AM Psion..ok..no problem i will try it ..thanks
Register as a new user