Playing wavesound or midi using MFC
I'm creating a game application, may i know how to add in audio feature? ie when i click the start button, the background music will start to play, then when i click a bomb button, an explosion can be heard.
i roughly look at the Media player activeX control, but it seems offering up a lot of classes and sounds complicated.
Re: Playing wavesound or midi using MFC
Check out these links....will be very helpful !!
Audio & Video articles
Multimedia
Playing Midi files with DirectMusic
if a link helps,dont forget to "Rate this post"
Re: Playing wavesound or midi using MFC
#include "mmsystem.h"
BOOL PlaySound(LPCSTR pszSound, HMODULE hmod, DWORD fdwSound);
http://msdn.microsoft.com/library/de..._playsound.asp
Re: Playing wavesound or midi using MFC
PlaySound work for wave file and is able to loop as well.
Right now i'm using a midi file, playing the file is not a problem, but i have no idea how to loop it using mciSendString. Can anyone help?
Re: Playing wavesound or midi using MFC
So if you are making some serious things, then use some free libs...like
http://www.openal.org/
http://www.libsdl.org/index.php
Trigve