Click to See Complete Forum and Search --> : C++ sounds


Dave
March 31st, 1999, 01:09 PM
Does anyone know how I can create sound using the internal speaker in a computer using MSVC 5.0? I've seen how to use .wav files, but I want to use the internal speaker. Like those annoying beeps from old Atari games. I need more of a variety than what MessageBeep will provide. Thanks!!

Kevin Delgado
March 31st, 1999, 01:33 PM
use the API function Beep(), and pass in a frequency and a duration:


BOOL bResult;

bResult = Beep(100, 100);

Kevin Delgado
March 31st, 1999, 01:34 PM
Forgot...the function wont work properly on 95, but will work on NT. Not sure if it works on 98.