Playing a simple .wav sound in a c++ application
For my AP computer science class, we have to make this pacman game for our final project.
I want to add sound to my game. I have a wav file that I want to play every time he eats
a dot. What code and header files do i have to use to get him to play a sound?
Larry Charles
CEO Centra Entertainment Studios
Using the Platform SDK (i.e. no DirectSound):
Header: Declared in Mmsystem.h; include Windows.h.
Library: Use Winmm.lib.
Have a look to here for details
Forever trusting who we are
And nothing else matters - Metallica
BOOL PlaySound( LPCSTR pszSound, HMODULE hmod, DWORD fdwSound );
Header: Declared in Mmsystem.h; include Windows.h.
Library: Use Winmm.lib.
Have a look to here for details
Forever trusting who we are
And nothing else matters - Metallica
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement