can anyone teach mi how to insert a .wav file into the project and make it play automatic ??
can anyone teach mi how to insert a .wav file into the project and make it play automatic ??
Just call PlaySound when you want the sound *.wav to play.
Code:PlaySound("yourwav.wav",NULL,SND_FILENAME | SND_ASYNC);
Will that work with mp3's as well, or just wav files?
"Some succeed because they are destined to, others succeed because they are determined to."
~Anonymous
"A shorn scrotum is quite breathtaking, I suggest you try it."
~Dr. Evil
EMT/Firefighter
Eagle Scout
Just wav files. mp3s have to be decoded into a wav format to be played
cannot
its a unknown function to the visiual c++
must i add any file anot ???
You need to make sure that you link to winmm.lib and include mmsystem.h.
It's in mmsystem.h, too. Jus do this:
mciSendString(
"play file.mp3",
0,
0,
0
);
Website(s): http://www16.brinkster.com/trifaze/
E-mail: [email protected]
---------------------------------
C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
DirectX Version: 9.0b
DX SDK: DirectX 8.1 SDK