Hello there,

I am writing a code for a game. simply, I need to play a "wav" sound whenever the player click an object on the screen. I am using Borland C++ Builder 5.

I have tried this by including:
#include <MPlayer.hpp>

TMediaPlayer *Mp;

in my header file and

Mp->filename = "sound27.wav";
Mp->open();
Mp->play();

in my main code;

I can compile and build the project. but whenever i play the game, when it reaches to the point that it should play the sound, it hangs !!

appreciate your help. what should i do to solve this problem..

thanks alot : )