Playing a simple .wav sound in a c++ application

Started by
0 comments, last by flip5577 21 years, 11 months ago
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
Larry CharlesCentra Entertainment Studios
Advertisement
Using the Platform SDK (i.e. no DirectSound):
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
Forever trusting who we areAnd nothing else matters - Metallica

This topic is closed to new replies.

Advertisement