-
Playing sound files
Hello,
I've been taking C++ as a High School AP course, and currently we're writing our final program of the year. I've been wondering how to include sounds files (either as .wav or preferrably .mp3) into my program and play them. I use Metrowerk's CodeWarrior, which uses MS-DOS window for file execution. If you need more information about my compiler etc. let me know. I'd appreciate any help on this subject.
Thanks,
Brak
-
You must link your project to libwinmm.a
In my compiler, you must add this directive to the compiler linker:
-lwinmm
This is good for .wav files, don't know about mp3...
PlaySound("sound.wav", NULL, SND_ASYNC);
...works fine...