What should I use to replace the WinAPI Beep() function?
- by Jon Cage
I've got a Visual C++/CLI app which uses beeps to signify good and bad results (used when the user can't see the screen).
Currently I use low pitched beeps for bad results and high pitched beeps for good results:
if( goodResult == true )
{
Beep(1000, 40);
}
else
{
Beep(2000, 20);
}
This works okay on my Vista laptop, but I've tried it on other laptops and some seem to play the sounds for less time (they sound more like clicks than beeps) or the sound doesn't play at all.
So I have two questions here:
Is there a more reliable beep function?
Is there a (simple) way I can play a short .wav file or something similar instead (preferred solution).