View Full Version : C++ problem
VComegasin
2002-11-24, 06:25 PM
how do i make sound with C++? Please, I need to know, it's for a big project for my school~
WetWired
2002-11-25, 06:45 AM
That would depend upon what kind of sound and under what operating environment. Did you try looking in the index of your reference books for beep or sound?
"CRØNîC-KîLLå"
2002-11-25, 08:15 AM
are u wondering how to change/make sound in the internal speakers?
VComegasin
2002-11-25, 03:28 PM
actually wetwitre, you are right, I just want to make some pc beep~ I did it long time ago, it's like you have to give the computer some frequency of the sound! Do you know what else I can do?
WetWired
2002-11-26, 07:07 AM
I don't know how to do a PC speaker beep. It's been a while...like I said, best bet is to look it up in whatever reference book you are using for the class. If you are writing Windows programs, I should be able to find how to play a wave file...
Dalton
2002-11-26, 10:15 AM
There are so many ways to call the beep.
Escape characters, like \a and \007 cause your program to beep.
If you have "#include <beep.h> /* got beep? */" you can define it as beep(x, y) (frequency and length)
Or..you can code it with echo.
#include <iostream.h>
void main()
{
cout << "beep beep!\a\n";
}
// eof
I am sure this will work on c++, if you print out.. (char)7
vBulletin® v3.8.2, Copyright ©2000-2024, Jelsoft Enterprises Ltd.